Skip to content

try-works/role-model / .agents/skills/ui-design-system

ui-design-system

Unverified

React UI component systems with TailwindCSS + Radix + shadcn/ui. Stack: TailwindCSS (styling), Radix UI (primitives), shadcn/ui (components), React/Next.js. Capabilities: design system architecture, accessible components, responsive layouts, theming, dark mode, component composition. Actions: review, design, build, improve, refactor UI components. Keywords: TailwindCSS, Radix UI, shadcn/ui, design system, component library, accessibility, ARIA, responsive, dark mode, theming, CSS variables, component architecture, atomic design, design tokens, variant, slot, composition. Use when: building component libraries, implementing shadcn/ui, creating accessible UIs, setting up design systems, adding dark mode/theming, reviewing UI component architecture.

FileKindSize
SKILL.mdskill md19.6 KB
canvas-fonts/ArsenalSC-OFL.txtmarkdown4.3 KB
canvas-fonts/ArsenalSC-Regular.ttfbinary162.0 KB
canvas-fonts/BigShoulders-Bold.ttfbinary92.3 KB
canvas-fonts/BigShoulders-OFL.txtmarkdown4.3 KB
canvas-fonts/BigShoulders-Regular.ttfbinary92.2 KB
canvas-fonts/Boldonse-OFL.txtmarkdown4.3 KB
canvas-fonts/Boldonse-Regular.ttfbinary75.4 KB
canvas-fonts/BricolageGrotesque-Bold.ttfbinary88.8 KB
canvas-fonts/BricolageGrotesque-OFL.txtmarkdown4.3 KB
canvas-fonts/BricolageGrotesque-Regular.ttfbinary88.8 KB
canvas-fonts/CrimsonPro-Bold.ttfbinary104.8 KB
canvas-fonts/CrimsonPro-Italic.ttfbinary106.3 KB
canvas-fonts/CrimsonPro-OFL.txtmarkdown4.3 KB
canvas-fonts/CrimsonPro-Regular.ttfbinary104.2 KB
canvas-fonts/DMMono-OFL.txtmarkdown4.3 KB
canvas-fonts/DMMono-Regular.ttfbinary47.7 KB
canvas-fonts/EricaOne-OFL.txtmarkdown4.3 KB
canvas-fonts/EricaOne-Regular.ttfbinary24.3 KB
canvas-fonts/GeistMono-Bold.ttfbinary76.5 KB
canvas-fonts/GeistMono-OFL.txtmarkdown4.3 KB
canvas-fonts/GeistMono-Regular.ttfbinary76.4 KB
canvas-fonts/Gloock-OFL.txtmarkdown4.3 KB
canvas-fonts/Gloock-Regular.ttfbinary92.9 KB
canvas-fonts/IBMPlexMono-Bold.ttfbinary132.8 KB
canvas-fonts/IBMPlexMono-OFL.txtmarkdown4.3 KB
canvas-fonts/IBMPlexMono-Regular.ttfbinary130.7 KB
canvas-fonts/IBMPlexSerif-Bold.ttfbinary157.2 KB
canvas-fonts/IBMPlexSerif-BoldItalic.ttfbinary165.9 KB
canvas-fonts/IBMPlexSerif-Italic.ttfbinary166.0 KB
canvas-fonts/IBMPlexSerif-Regular.ttfbinary156.6 KB
canvas-fonts/InstrumentSans-Bold.ttfbinary66.5 KB
canvas-fonts/InstrumentSans-BoldItalic.ttfbinary68.4 KB
canvas-fonts/InstrumentSans-Italic.ttfbinary68.3 KB
canvas-fonts/InstrumentSans-OFL.txtmarkdown4.3 KB
canvas-fonts/InstrumentSans-Regular.ttfbinary66.4 KB
canvas-fonts/InstrumentSerif-Italic.ttfbinary69.2 KB
canvas-fonts/InstrumentSerif-Regular.ttfbinary67.7 KB
canvas-fonts/Italiana-OFL.txtmarkdown4.3 KB
canvas-fonts/Italiana-Regular.ttfbinary26.5 KB
canvas-fonts/JetBrainsMono-Bold.ttfbinary112.1 KB
canvas-fonts/JetBrainsMono-OFL.txtmarkdown4.3 KB
canvas-fonts/JetBrainsMono-Regular.ttfbinary112.2 KB
canvas-fonts/Jura-Light.ttfbinary150.7 KB
canvas-fonts/Jura-Medium.ttfbinary150.9 KB
canvas-fonts/Jura-OFL.txtmarkdown4.3 KB
canvas-fonts/LibreBaskerville-OFL.txtmarkdown4.3 KB
canvas-fonts/LibreBaskerville-Regular.ttfbinary144.1 KB
canvas-fonts/Lora-Bold.ttfbinary130.7 KB
canvas-fonts/Lora-BoldItalic.ttfbinary137.0 KB
canvas-fonts/Lora-Italic.ttfbinary136.1 KB
canvas-fonts/Lora-OFL.txtmarkdown4.3 KB
canvas-fonts/Lora-Regular.ttfbinary130.8 KB
canvas-fonts/NationalPark-Bold.ttfbinary77.4 KB
canvas-fonts/NationalPark-OFL.txtmarkdown4.3 KB
canvas-fonts/NationalPark-Regular.ttfbinary74.6 KB
canvas-fonts/NothingYouCouldDo-OFL.txtmarkdown4.3 KB
canvas-fonts/NothingYouCouldDo-Regular.ttfbinary31.3 KB
canvas-fonts/Outfit-Bold.ttfbinary54.1 KB
canvas-fonts/Outfit-OFL.txtmarkdown4.3 KB
canvas-fonts/Outfit-Regular.ttfbinary53.6 KB
canvas-fonts/PixelifySans-Medium.ttfbinary49.9 KB
canvas-fonts/PixelifySans-OFL.txtmarkdown4.3 KB
canvas-fonts/PoiretOne-OFL.txtmarkdown4.3 KB
canvas-fonts/PoiretOne-Regular.ttfbinary44.2 KB
canvas-fonts/RedHatMono-Bold.ttfbinary33.6 KB
canvas-fonts/RedHatMono-OFL.txtmarkdown4.3 KB
canvas-fonts/RedHatMono-Regular.ttfbinary33.7 KB
canvas-fonts/Silkscreen-OFL.txtmarkdown4.3 KB
canvas-fonts/Silkscreen-Regular.ttfbinary31.2 KB
canvas-fonts/SmoochSans-Medium.ttfbinary58.3 KB
canvas-fonts/SmoochSans-OFL.txtmarkdown4.3 KB
canvas-fonts/Tektur-Medium.ttfbinary74.5 KB
canvas-fonts/Tektur-OFL.txtmarkdown4.3 KB
canvas-fonts/Tektur-Regular.ttfbinary73.8 KB
canvas-fonts/WorkSans-Bold.ttfbinary186.8 KB
canvas-fonts/WorkSans-BoldItalic.ttfbinary171.7 KB
canvas-fonts/WorkSans-Italic.ttfbinary170.2 KB
canvas-fonts/WorkSans-OFL.txtmarkdown4.3 KB
canvas-fonts/WorkSans-Regular.ttfbinary184.5 KB
canvas-fonts/YoungSerif-OFL.txtmarkdown4.3 KB
canvas-fonts/YoungSerif-Regular.ttfbinary102.7 KB
references/CUSTOMIZATION.mdmarkdown7.2 KB
references/DESIGN_TOKENS.mdmarkdown4.3 KB
references/INTEGRATION_PATTERNS.mdmarkdown15.0 KB
references/PERFORMANCE_OPTIMIZATION.mdmarkdown7.8 KB
references/RADIX_REFERENCE.mdmarkdown15.1 KB
references/RESPONSIVE_PATTERNS.mdmarkdown4.2 KB
references/SHADCN_REFERENCE.mdmarkdown10.9 KB
references/TAILWIND_REFERENCE.mdmarkdown10.1 KB
references/canvas-design-system.mdmarkdown7.7 KB
scripts/.coverageother52.0 KB
scripts/requirements.txtmanifest444 B
scripts/shadcn_add.pyscript7.8 KB
scripts/tailwind_config_gen.pyscript13.3 KB
scripts/tests/coverage-ui.jsonconfig48.8 KB
scripts/tests/requirements.txtmanifest52 B
scripts/tests/test_shadcn_add.pyscript9.7 KB
scripts/tests/test_tailwind_config_gen.pyscript11.9 KB

references/DESIGN_TOKENS.md

View on GitHub
# Design Token Architecture

## Three-Tier Token System (Industry Standard)

Based on USWDS, IBM Carbon, and Shopify Polaris patterns.

### Tier 1: Primitive Tokens (Foundation Layer)
- Raw design values without context
- Examples: `gray-50`, `gray-900`, `spacing-4`, `font-sans`
- Purpose: "The most basic form of tokens, reducing infinite possibilities to a select few"
- Never reference other tokens
- Immutable across themes

### Tier 2: Semantic Tokens (Context Layer)
- Carry meaning about usage
- Examples: `background-primary`, `text-error`, `border-interactive`
- Purpose: Describe function, not appearance
- Reference primitive tokens
- Change between themes (light/dark)

### Tier 3: Component Tokens (Application Layer)
- Specific to UI components
- Examples: `button-height`, `card-padding`, `input-border-radius`
- Reference semantic or primitive tokens
- Enable component-level theming

### Token Hierarchy Benefits
- Single source of truth
- Update one token → cascades everywhere
- Dark mode: Change semantic layer only
- Rebrand: Update primitive layer only

## OKLCH Color Space (Modern Standard)

### Why OKLCH over HSL
- **Perceptually uniform**: Equal lightness steps look equal to human eyes
- **Consistent brightness**: Yellow/cyan don't appear lighter than blue/red
- **Algorithmic palettes**: Generate entire color systems from formulas
- **Better gradients**: Smooth transitions without lightness jumps
- **Accessibility**: Easier to calculate contrast ratios

### Browser Support
- 93%+ (2024) - All modern browsers
- TailwindCSS v4 uses OKLCH by default

### Format: `oklch(L C H)`
- **L**: Lightness (0-1 or 0%-100%)
- **C**: Chroma/saturation (0-0.4)
- **H**: Hue (0-360 degrees)

### HSL vs OKLCH Example
- **HSL**: `hsl(210, 100%, 50%)` - Unpredictable perceived brightness
- **OKLCH**: `oklch(0.55 0.22 264)` - Perceptually consistent

## Token Naming Conventions

Best practices from Smashing Magazine & Design Systems Collective.

### Structure Pattern
```
[category]-[property]-[variant]-[state]
```

### Purpose-Driven Names ✅
- `background-primary` (semantic)
- `text-error` (semantic)
- `button-primary-hover` (component + state)

### Avoid Appearance-Based ❌
- `blue-500` (no context)
- `dark-blue-bg` (ties to visual)
- `header-color-1` (meaningless)

### Color Naming
- **Primitives**: `[family]-[brightness]` → `gray-50` to `gray-900`
- **Semantic**: `[purpose]-[role]` → `background-primary`, `text-on-primary`
- **Component**: `[component]-[property]` → `button-background-primary`

### Key Characteristics
- **Logical**: Consistent patterns team understands
- **Scalable**: Accommodates growth without restructuring
- **Searchable**: Easy filtering in design tools
- **Short**: Balance descriptiveness with brevity

## CSS Variable Configuration

### Three-Tier CSS Variables
```css
:root {
  /* Tier 1: Primitives (immutable) */
  --gray-50: 250 250 250;
  --gray-900: 24 24 27;
  --blue-500: oklch(0.55 0.22 264);

  /* Tier 2: Semantics (theme-aware) */
  --background: var(--gray-50);
  --foreground: var(--gray-900);
  --primary: var(--blue-500);

  /* Tier 3: Components */
  --button-height: 2.5rem;
  --card-padding: 1.5rem;
}

.dark {
  /* Only semantic tokens change */
  --background: var(--gray-900);
  --foreground: var(--gray-50);
}
```

### Color Space Recommendation
- **Modern**: Use OKLCH for perceptual uniformity
- **Legacy support**: Use HSL with fallbacks
- **Avoid**: RGB/HEX for design tokens (not human-readable)

### Token Storage
- Store in JSON for platform-agnostic distribution
- Transform to CSS variables, Swift, XML using Style Dictionary
- Version control tokens separately from component code

## Multi-Theme Support

Support multiple brands/themes:
- Define theme objects with token values
- Inject CSS variables dynamically with JavaScript
- Semantic tokens adapt per theme
- Primitive tokens can vary by brand

## Implementation Checklist

- [ ] Define primitive tokens (colors, spacing, typography)
- [ ] Create semantic tokens that reference primitives
- [ ] Build component tokens for specific UI elements
- [ ] Use OKLCH color space for modern browsers
- [ ] Implement three-tier CSS variable structure
- [ ] Store tokens in JSON for platform-agnostic use
- [ ] Document naming conventions for the team
- [ ] Test dark mode with semantic token switching
- [ ] Validate token cascade (primitive → semantic → component)
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 197kUpdated Claude CodeCodexVerifiedInstall