Files
sar/_bmad/wds/data/design-system/naming-conventions.md
julian 17c08e6392 chore: initial monorepo scaffold + WDS Phase 1+2 artifacts
- Nx 22.7 monorepo (pnpm 11.1, TypeScript 5.9, Node 24)
- apps/api: NestJS 11 (CJS conforme CODING-RULES.md PGD-DB-004)
- apps/web: React 19 + Vite 8 (ESM)
- libs/shared/api-interface: Zod contract base
- Docker Compose dev: Postgres 18, Valkey 8, MinIO, Mailpit
- WDS artifacts:
  - design-artifacts/A-Product-Brief/ (5 docs canônicos + 16 dialogs)
  - design-artifacts/B-Trigger-Map/ (hub + 4 personas + feature impact)
- Stack canon: STACK.md v2.2 + CODING-RULES.md v2.0 + brand.md
- AGENTS.md + README.md como entrada para devs/agentes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:34:20 +00:00

2.8 KiB

Design System Naming Conventions

Purpose: Consistent naming across design system components and tokens.

Referenced by: Component-type instructions, design system operations


Component IDs

Format: [type-prefix]-[number]

Prefixes:

  • btn = Button
  • inp = Input Field
  • chk = Checkbox
  • rad = Radio
  • tgl = Toggle
  • drp = Dropdown
  • mdl = Modal
  • crd = Card
  • alt = Alert
  • bdg = Badge
  • tab = Tab
  • acc = Accordion

Examples:

  • btn-001 = First button component
  • inp-002 = Second input field component
  • mdl-001 = First modal component

Rules:

  • Always lowercase
  • Always hyphenated
  • Always zero-padded (001, not 1)
  • Sequential within type

Component Names

Format: [Type] [Descriptor] or just [Type]

Examples:

  • Button (generic)
  • Navigation Button (specific)
  • Primary Button (variant-focused)
  • Icon Button (visual-focused)

Rules:

  • Title case
  • Descriptive but concise
  • Avoid redundancy (not "Button Button")

Variant Names

Format: Lowercase, hyphenated

Purpose-Based:

  • primary - Main action
  • secondary - Secondary action
  • destructive - Delete/remove
  • success - Positive confirmation
  • warning - Caution
  • navigation - Navigation action

Visual-Based:

  • outlined - Border, no fill
  • ghost - Transparent background
  • solid - Filled background

Size-Based:

  • small - Compact
  • medium - Default
  • large - Prominent

Rules:

  • Lowercase
  • Hyphenated for multi-word
  • Semantic over visual when possible

State Names

Standard States:

  • default - Normal state
  • hover - Mouse over
  • active - Being clicked/pressed
  • focus - Keyboard focus
  • disabled - Cannot interact
  • loading - Processing
  • error - Error state
  • success - Success state
  • warning - Warning state

Rules:

  • Lowercase
  • Single word preferred
  • Use standard names when possible

Design Token Names

Format: --{category}-{property}-{variant}

Color Tokens:

--color-primary-500
--color-gray-900
--color-success-600
--color-error-500

Typography Tokens:

--text-xs
--text-base
--text-4xl
--font-normal
--font-bold

Spacing Tokens:

--spacing-1
--spacing-4
--spacing-8

Component Tokens:

--button-padding-x
--input-border-color
--card-shadow

Rules:

  • Kebab-case
  • Hierarchical (general → specific)
  • Semantic names preferred

File Names

Component Files:

button.md
navigation-button.md
input-field.md

Rules:

  • Lowercase
  • Hyphenated
  • Match component name (simplified)

Folder Names

components/
design-tokens/
operations/
assessment/
templates/

Rules:

  • Lowercase
  • Hyphenated
  • Plural for collections

Consistency in naming makes the design system easier to navigate and maintain.