Home / Type/ DesignSystem Type — tailwindcss Architecture

DesignSystem Type — tailwindcss Architecture

Architecture documentation for the DesignSystem type/interface in design-system.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  4aee9dc2_8e26_c9e9_5ea8_557fc1fc8b73["DesignSystem"]
  7fd72d4c_e95c_d849_1002_1e1c9d8aca1a["design-system.ts"]
  4aee9dc2_8e26_c9e9_5ea8_557fc1fc8b73 -->|defined in| 7fd72d4c_e95c_d849_1002_1e1c9d8aca1a
  style 4aee9dc2_8e26_c9e9_5ea8_557fc1fc8b73 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/design-system.ts lines 35–68

export type DesignSystem = {
  theme: Theme
  utilities: Utilities
  variants: Variants

  invalidCandidates: Set<string>

  // Whether to mark utility declarations as !important
  important: boolean

  getClassOrder(classes: string[]): [string, bigint | null][]
  getClassList(): ClassEntry[]
  getVariants(): VariantEntry[]

  parseCandidate(candidate: string): Readonly<Candidate>[]
  parseVariant(variant: string): Readonly<Variant> | null
  compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>

  printCandidate(candidate: Candidate): string
  printVariant(variant: Variant): string

  getVariantOrder(): Map<Variant, number>
  resolveThemeValue(path: string, forceInline?: boolean): string | undefined

  trackUsedVariables(raw: string): void
  canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[]

  // Used by IntelliSense
  candidatesToCss(classes: string[]): (string | null)[]
  candidatesToAst(classes: string[]): AstNode[][]

  // General purpose storage
  storage: Record<symbol, unknown>
}

Frequently Asked Questions

What is the DesignSystem type?
DesignSystem is a type/interface in the tailwindcss codebase, defined in packages/tailwindcss/src/design-system.ts.
Where is DesignSystem defined?
DesignSystem is defined in packages/tailwindcss/src/design-system.ts at line 35.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free