DEV Community

Cover image for Building Design Systems
Tanoy Basak
Tanoy Basak

Posted on

Building Design Systems

Building Design Systems

The design system is a collection of patterns and guidelines that are used to design and develop a digital product and that allows designers and developers to deliver consistent experiences, regardless of the device or technology used.
It is adopted by many companies as a design tool around which a product is built in its various components, sharing the language, the objectives and the procedures, ultimately creating its own identity for the product that is consistent with all the company’s communication channels.
Building design systems using Atomic Design pattern

Atomic design provides a clear methodology for crafting design systems. It is a mental model, and not a linear process, based on ‘’ do one thing and do it well ‘’, a scalable methodology, oriented towards problem solving and which favors usability.
Atomic design gives us the ability to traverse from abstract to concrete. Because of this, we can create systems that promote consistency and scalability while simultaneously showing things in their final context. And by assembling rather than deconstructing, we’re crafting a system right out of the gate instead of cherry-picking patterns after the fact.

Here’s a brief overview of the different levels in atomic design:

  1. Atoms: These are the basic building blocks of the design system. Atoms include fundamental HTML elements such as buttons, inputs, labels, and more. They represent the smallest, indivisible parts of the user interface.

  2. Molecules: Molecules are groups of atoms bonded together and act as a unit. For example, a form label, input, and button can combine to create a search form molecule. Molecules start to take on their own distinct properties and serve a particular function.

  3. Organisms: Organisms are relatively complex components composed of groups of molecules and/or atoms. They form distinct sections of an interface, such as a navigation bar, a footer, or a card component. Organisms can consist of similar or different types of molecules.

  4. Templates: Templates are page-level objects that place components into a layout and articulate the design’s underlying content structure. They are essentially a skeleton of the final page, containing placeholders for the actual content.

  5. Pages: Pages are specific instances of templates that include real content. They provide a snapshot of the final user interface, showing how all the components come together to form a complete, working design.

Creating Ui components using Lit web components

Lit is a simple library for building fast, lightweight web components that work in any framework, or with no framework at all. With Lit you can build shareable components, applications, design systems, and more.
Lit provides APIs to simplify common Web Components tasks like managing properties, attributes, and rendering.

Why Lit?
Here are some key reasons to use Lit for building design systems:

  1. Web Standards Compliance: Lit builds on Web Components, ensuring compatibility with modern browsers and frameworks. Lit components are based on standard Web Components, they can be used alongside any JavaScript framework or library, such as React, Angular, or Vue. This interoperability allows developers to integrate Lit components into existing projects seamlessly.

  2. Lightweight and Performant: Lit's emphasis on minimalism, efficient rendering strategies, and leveraging native browser features makes it well-suited for building high-performance web applications and design systems. These characteristics contribute to faster initial load times, smoother interactions, and a better user experience.

  3. Reactive Properties: Lit simplifies state management by offering a reactive programming model that automatically updates the user interface (UI) in response to changes in component properties.

  4. Scoped Styles: Lit leverages Shadow DOM to provide scoped styles within components, thereby preventing global CSS conflicts. This approach enhances maintainability, encourages component-based design practices, and ensures a consistent user interface across complex web applications.

Top comments (0)