Understand Before You Build

  • HTML
    • Form
    • HTML pattern Attribute
  • CSS
    • inset
    • scroll-snap-type
    • margin-inline
    • Content-visibility
    • Scroll-Driven Animations
    • Isolation
    • @Container
    • @layer
    • :not()
    • :is()
    • :Where()
    • :has()
    • :target
    • backdrop-filter
    • :root
    • Color-scheme
    • Animations
    • Selectors
    • Object-fit
    • Logical Pseudo-Classes
    • :scope
    • Properties
    • Performance
    • Aspect-ratio
    • State Pseudo-Classes
    • Positioning
    • Resize
    • Structural Pseudo-Classes
    • Responsive Design
    • Units
    • Root & Scope Selectors
    • Scrolling
    • At-Rules
    • Target & URL Selectors
    • Spacing
    • Functions
    • Attribute Selectors
    • Layouts
    • Basic Selectors
    • Filters & Effects
    • Colors & Typography
    • Flexbox
    • Combinator Selectors
    • Grid
    • Form & UI State Selectors
    • AI CSS Generator
  • Sass
    • Variables
    • Nesting
    • Mixins
    • Reusable styles
    • Large project management
  • CSS Frameworks
    • Material UI
    • Bootstrap
    • Tailwind CSS
  • React UI
    • Performance Optimization
    • React.memo
    • useMemo
    • useCallback
    • Lazy Loading
    • Code Splitting
    • Virtual DOM Optimization
    • Preventing Re-renders
    • Props & State
    • Hooks
    • Component-based architecture
    • State-driven UI updates
  • Figma
    • Design systems
    • Tokens
    • Variables
    • Auto layout
    • Component variants
    • Design handoff
    • UI consistency

Basics of Design systems

Design System is a collection of reusable UI components, rules, styles, and guidelines used to build consistent applications.

It helps designers and developers create scalable and maintainable UI.


Simple Meaning

Instead of designing and coding every screen from scratch:

  • Create reusable UI rules once
  • Reuse them across the project

This creates consistency and faster development.

Why Design Systems Are Important?

  • Consistent UI
  • Reusable components
  • Faster frontend development
  • Easy team collaboration
  • Scalable architecture
  • Easy maintenance
  • Better user experience

Real World Example

Large companies use design systems:

  • Material Design
  • Human Interface Guidelines
  • Carbon Design System
  • Atlassian Design System

Main Parts of a Design System

  • Colors
  • Typography
  • Spacing
  • Grid system
  • Buttons
  • Forms
  • Icons
  • Cards
  • Modals
  • Tables
  • Themes
  • Responsive rules

1. Design Tokens

Design Tokens are reusable design values.

These are the foundation of a design system.


Examples

[code theme="dark"] Primary Color Font Size Spacing Border Radius Shadow [/code]

SCSS Example

[code theme="dark"] $primary:#ff6600; $radius:12px; $spacing-md:16px; [/code]

Tailwind Example

[code theme="dark"] colors:{ primary:"#ff6600" } [/code]

Design Token Visual Example

[grid] image image image image image [/grid]

2. Typography System

Typography rules define:

  • Font family
  • Font sizes
  • Line height
  • Font weights
  • Heading hierarchy

Example

[code theme="dark"] Heading 1 → 48px Heading 2 → 36px Body Text → 16px [/code]

Typography Scale Example

[grid] image image image image image image [/grid]

3. Color System

Design systems define consistent color palettes.


Common Colors

  • Primary
  • Secondary
  • Success
  • Error
  • Warning
  • Background
  • Text colors

Example

[code theme="dark"] Primary → Blue Danger → Red Success → Green [/code]

Color Palette Example

[grid] image image image image image image [/grid]

4. Spacing System

Consistent spacing creates professional UI.


Example Scale

[code theme="dark"] 4px 8px 12px 16px 24px 32px [/code]

Why Important?

  • Visual consistency
  • Cleaner layouts
  • Better responsive design

Spacing System Example

[grid] image image image image image image image [/grid]

5. Grid System

Grid systems help align UI consistently.


Common Grid

[code theme="dark"] 12 Column Grid [/code]

Used For

  • Responsive layouts
  • Dashboard UI
  • Cards alignment
  • Page structure

Grid Layout Example

[grid] image image image image image image [/grid]

6. Reusable Components

Design systems create reusable UI components.


Examples

  • Buttons
  • Cards
  • Modals
  • Inputs
  • Dropdowns
  • Navbar

Component Example

[code theme="dark"]