Forge Design System
Forge is a React component library that ships as wss3-forge. Every UI concern (layout, forms, overlays, data display, charts, motion) is covered by a component. All colors, spacing, radius, shadows, and motion live in CSS variables injected by ForgeProvider.
Decision rule: if the task changes what the user sees, touches, or waits for, load this skill.
Find by task
Lookup table for the most common requests. Jump straight to the relevant anchor.
| If you're trying to |
Read |
Skip ahead |
| Build a login screen |
patterns.md |
#auth |
| Build signup or forgot-password |
patterns.md |
#auth-forgot |
| Show a toast on user action |
components.md |
#feedback-toast |
| Inline alert (success, error, info) |
components.md |
#feedback-decision |
| Errored input with screen-reader feedback |
a11y.md |
#inputs |
| Icon-only button |
a11y.md |
#buttons |
| Pricing strip with monthly/yearly toggle |
patterns.md |
#pricing |
| Pick Modal vs Sheet vs Drawer vs Popover |
components.md |
#overlay-decision |
| Pick Card vs StatCard vs KpiCard |
components.md |
#cards-decision |
| Pick VStack vs HStack vs Grid vs Box |
components.md |
#layout-decision |
| Pick Input vs Select vs Combobox |
components.md |
#forms-decision |
| Pick Checkbox vs Switch vs Radio vs Tabs |
components.md |
#selection-decision |
| Animate items into view, one by one |
motion.md |
#stagger |
| Sticky scroll-jacked phase |
motion.md |
#sticky-section |
| Brand color customization |
theming.md |
#brand-customization-in-30-seconds |
| Theme color won't apply |
faq.md |
faq.md |
| Empty state |
patterns.md |
#empty-state |
| Loading or error or empty triad |
patterns.md |
#triad |
| Settings page (profile, billing, team) |
patterns.md |
#settings |
| Marketing page (hero, pricing, testimonials) |
patterns.md |
#marketing |
| Data screen (table, master-detail, kanban) |
patterns.md |
#data |
| Dashboard with sidebar |
patterns.md |
#dashboard-sidebar--content |
| Build a docs site |
patterns.md |
#docs |
| Pick Navbar vs AppSidebar (horizontal vs vertical menu) |
components.md |
#navigation |
Review priority (check in this order)
- Accessibility. Focus visible, correct roles,
aria-label on icon-only buttons, aria-invalid/aria-describedby on errored inputs, keyboard navigation works, reduced motion respected. See a11y.md.
- Semantics. Using the right Forge primitive:
Heading not styled <h1>, Button not styled <button>, VStack/HStack not flex <div>, Card not styled container. See anti-patterns.md.
- Motion. Durations 150 to 300ms for interactions, reduced-motion respected by
ForgeProvider, no animations over 500ms for UI feedback. See motion.md.
- Theme parity. Code works in both
darkTheme and lightTheme. No hardcoded rgba(255, 255, 255, ...) or #xxx. Use CSS vars or color-mix(in srgb, currentColor N%, transparent).
- Performance.
VirtualList when rendering more than 100 rows, lazy routes, <Motion whileInView> over animate for offscreen content.
Hard rules
- Import only from
'wss3-forge'. No deep imports.
- Wrap the app in
<ForgeProvider>. Without it every component renders unstyled.
- Icons only from
@fluentui/react-icons. Convention: {Name}{Size}{Style} (e.g. ArrowRight20Regular).
- Colors via
var(--...). No hardcoded hex, RGB, or color names.
- Spacing via gap/padding props on Forge primitives. No raw
px/rem when a semantic key exists.
- Layout via
VStack, HStack, Stack, Grid, Flex, Box, Center, Spacer, AspectRatio. No flex divs.
- Responsive via
useIsMobile, useBreakpoint, or responsive object props. No @media queries in app code.
- Typography via
Heading, Text, Label. Never style <h1>, <span>, or <p> manually.
- No em-dashes anywhere. Period, comma, colon, or line break.
- No emojis in UI. Use Fluent icons.
- No decorative colored backgrounds behind icons. Color the glyph itself via
style={{ color: '...' }}. Only StatusBadge, Avatar status, and colored Badge variants keep a tinted surface.
- No custom components when Forge provides one. Check components.md first.
- No custom CSS classes for design-system concerns (spacing, color, radius, shadow, typography). Use props or CSS vars.
For the reasoning behind each rule, see design.md. For concrete wrong/right pairs, see anti-patterns.md.
What Forge is NOT
Forge is a restrained design system. These are baseline anti-aesthetics:
- No aurora-gradient backgrounds. The page reads as flat surfaces with brand-tinted accents, not as a colored sky.
- No glass-on-everything. Backdrop-filter is a tool for the navbar and the modal scrim, not for every card.
- No icon glow / icon-tint backgrounds. Color the glyph itself; let surfaces stay calm.
- No cyan-magenta-violet gradients. They read as AI-template defaults; we build for Linear / Stripe / Vercel restraint.
- No streaming-text fakery, no ASCII art in production UI, no AI-marketing clichés.
When in doubt, restrain. Forge ships polished defaults; consumers reach for them, not around them.
Pre-delivery checklist
Before claiming done, verify:
Files in this skill
Load the file that matches your task. Do not load them all at once.
- getting-started.md five-minute install and first screen. Read this first if Forge is not already wired up.
- components.md every export grouped by category, with props table. Read this when picking a component or looking up props.
- tokens.md CSS variables, spacing scale, radius, shadows, z-index, motion tokens, breakpoints, color constants. Read this when styling edges Forge does not cover with a prop.
- theming.md
ForgeProvider props, ForgeTheme fields, default darkTheme and lightTheme, createTheme, useForge. Read this when configuring the provider or building a custom theme.
- motion.md the Motion library (
Motion, AnimatePresence, Stagger, gesture, scroll, text/visual effects, canvas backgrounds, motion hooks). Read this when adding animations.
- patterns.md full compositions for dashboards, forms, responsive sidebars, list-with-actions, plus quality gates per pattern and block creation rules. Read this when building a page, not a single component.
- a11y.md accessibility playbook: what Forge adds automatically per component and what the dev must still add. Read this when working on any interactive surface.
- anti-patterns.md wrong/right pairs for the most common mistakes. Skim this when you are about to write a styled native element, a flex div, a
@media query, or a hardcoded color.
- design.md design rules and the reasoning behind them. Read this when choosing between multiple valid approaches or when the user asks "why".
- migration.md upgrade notes from previous versions. Read this when bumping
wss3-forge.
- faq.md common gotchas and their fixes (unstyled components, 404s, wrong sizes). Read this when something does not behave as expected.
Typical flow
- Read the user's request.
- Open components.md and find the primitive that matches. If the request is a composition, open patterns.md first.
- If the primitive needs a color, radius, or spacing you cannot express with a prop, open tokens.md.
- If the request involves animation, open motion.md.
- If the request touches theming or provider configuration, open theming.md.
- If the request is interactive (form, menu, dialog, table), skim a11y.md.
- Write the code. Run through the Review priority and Pre-delivery checklist. Run
tsc --noEmit before claiming done.
Blocks
Block templates live under src/pages/blocks/blocks/{category}/{slug}/. Categories: marketing | dashboard | auth | commerce | settings | content | utility. Block creation rules are documented in patterns.md.
1---2name: forge3description: Forge design system for React. Use when writing any React UI in this project, when picking which component to use, when theming, when creating block templates, or when reviewing UI code for accessibility and anti-patterns. Covers components, tokens, theming, motion, patterns, a11y, and anti-patterns.4---56# Forge Design System78Forge is a React component library that ships as `wss3-forge`. Every UI concern (layout, forms, overlays, data display, charts, motion) is covered by a component. All colors, spacing, radius, shadows, and motion live in CSS variables injected by `ForgeProvider`.910**Decision rule:** if the task changes what the user sees, touches, or waits for, load this skill.1112## Find by task1314Lookup table for the most common requests. Jump straight to the relevant anchor.1516| If you're trying to | Read | Skip ahead |17|---|---|---|18| Build a login screen | patterns.md | [#auth](patterns.md#auth) |19| Build signup or forgot-password | patterns.md | [#auth-forgot](patterns.md#auth-forgot) |20| Show a toast on user action | components.md | [#feedback-toast](components.md#feedback-toast) |21| Inline alert (success, error, info) | components.md | [#feedback-decision](components.md#feedback-decision) |22| Errored input with screen-reader feedback | a11y.md | [#inputs](a11y.md#inputs) |23| Icon-only button | a11y.md | [#buttons](a11y.md#buttons) |24| Pricing strip with monthly/yearly toggle | patterns.md | [#pricing](patterns.md#pricing) |25| Pick Modal vs Sheet vs Drawer vs Popover | components.md | [#overlay-decision](components.md#overlay-decision) |26| Pick Card vs StatCard vs KpiCard | components.md | [#cards-decision](components.md#cards-decision) |27| Pick VStack vs HStack vs Grid vs Box | components.md | [#layout-decision](components.md#layout-decision) |28| Pick Input vs Select vs Combobox | components.md | [#forms-decision](components.md#forms-decision) |29| Pick Checkbox vs Switch vs Radio vs Tabs | components.md | [#selection-decision](components.md#selection-decision) |30| Animate items into view, one by one | motion.md | [#stagger](motion.md#stagger) |31| Sticky scroll-jacked phase | motion.md | [#sticky-section](motion.md#sticky-section) |32| Brand color customization | theming.md | [#brand-customization-in-30-seconds](theming.md#brand-customization-in-30-seconds) |33| Theme color won't apply | faq.md | [faq.md](faq.md) |34| Empty state | patterns.md | [#empty-state](patterns.md#empty-state) |35| Loading or error or empty triad | patterns.md | [#triad](patterns.md#triad) |36| Settings page (profile, billing, team) | patterns.md | [#settings](patterns.md#settings) |37| Marketing page (hero, pricing, testimonials) | patterns.md | [#marketing](patterns.md#marketing) |38| Data screen (table, master-detail, kanban) | patterns.md | [#data](patterns.md#data) |39| Dashboard with sidebar | patterns.md | [#dashboard-sidebar--content](patterns.md#dashboard-sidebar--content) |40| Build a docs site | patterns.md | [#docs](patterns.md#docs) |41| Pick Navbar vs AppSidebar (horizontal vs vertical menu) | components.md | [#navigation](components.md#navigation) |4243## Review priority (check in this order)44451. **Accessibility.** Focus visible, correct roles, `aria-label` on icon-only buttons, `aria-invalid`/`aria-describedby` on errored inputs, keyboard navigation works, reduced motion respected. See [a11y.md](a11y.md).462. **Semantics.** Using the right Forge primitive: `Heading` not styled `<h1>`, `Button` not styled `<button>`, `VStack`/`HStack` not flex `<div>`, `Card` not styled container. See [anti-patterns.md](anti-patterns.md).473. **Motion.** Durations 150 to 300ms for interactions, reduced-motion respected by `ForgeProvider`, no animations over 500ms for UI feedback. See [motion.md](motion.md).484. **Theme parity.** Code works in both `darkTheme` and `lightTheme`. No hardcoded `rgba(255, 255, 255, ...)` or `#xxx`. Use CSS vars or `color-mix(in srgb, currentColor N%, transparent)`.495. **Performance.** `VirtualList` when rendering more than 100 rows, lazy routes, `<Motion whileInView>` over `animate` for offscreen content.5051## Hard rules52531. Import only from `'wss3-forge'`. No deep imports.542. Wrap the app in `<ForgeProvider>`. Without it every component renders unstyled.553. Icons only from `@fluentui/react-icons`. Convention: `{Name}{Size}{Style}` (e.g. `ArrowRight20Regular`).564. Colors via `var(--...)`. No hardcoded hex, RGB, or color names.575. Spacing via gap/padding props on Forge primitives. No raw `px`/`rem` when a semantic key exists.586. Layout via `VStack`, `HStack`, `Stack`, `Grid`, `Flex`, `Box`, `Center`, `Spacer`, `AspectRatio`. No flex divs.597. Responsive via `useIsMobile`, `useBreakpoint`, or responsive object props. No `@media` queries in app code.608. Typography via `Heading`, `Text`, `Label`. Never style `<h1>`, `<span>`, or `<p>` manually.619. No em-dashes anywhere. Period, comma, colon, or line break.6210. No emojis in UI. Use Fluent icons.6311. No decorative colored backgrounds behind icons. Color the glyph itself via `style={{ color: '...' }}`. Only `StatusBadge`, `Avatar` status, and colored `Badge` variants keep a tinted surface.6412. No custom components when Forge provides one. Check [components.md](components.md) first.6513. No custom CSS classes for design-system concerns (spacing, color, radius, shadow, typography). Use props or CSS vars.6667For the reasoning behind each rule, see [design.md](design.md). For concrete wrong/right pairs, see [anti-patterns.md](anti-patterns.md).6869## What Forge is NOT7071Forge is a *restrained* design system. These are baseline anti-aesthetics:72- No aurora-gradient backgrounds. The page reads as flat surfaces with brand-tinted accents, not as a colored sky.73- No glass-on-everything. Backdrop-filter is a tool for the navbar and the modal scrim, not for every card.74- No icon glow / icon-tint backgrounds. Color the glyph itself; let surfaces stay calm.75- No cyan-magenta-violet gradients. They read as AI-template defaults; we build for Linear / Stripe / Vercel restraint.76- No streaming-text fakery, no ASCII art in production UI, no AI-marketing clichés.7778When in doubt, restrain. Forge ships polished defaults; consumers reach for them, not around them.7980## Pre-delivery checklist8182Before claiming done, verify:8384- [ ] `tsc --noEmit` clean.85- [ ] Works in both dark and light mode (no hardcoded dark-only colors).86- [ ] Focus ring visible on every interactive element.87- [ ] Icon-only buttons have `aria-label` or `tooltip`.88- [ ] Touch targets at least `size="sm"` (32px) on mobile flows.89- [ ] Motion durations within 150 to 300ms for interactions, reduced-motion respected.90- [ ] No em-dash, no emoji in UI strings.91- [ ] No hardcoded hex/rgba in styles. All colors via CSS var.92- [ ] No fallback or try/catch for scenarios that cannot happen.93- [ ] No trivial comments that restate the code.9495## Files in this skill9697Load the file that matches your task. Do not load them all at once.9899- [getting-started.md](getting-started.md) five-minute install and first screen. Read this first if Forge is not already wired up.100- [components.md](components.md) every export grouped by category, with props table. Read this when picking a component or looking up props.101- [tokens.md](tokens.md) CSS variables, spacing scale, radius, shadows, z-index, motion tokens, breakpoints, color constants. Read this when styling edges Forge does not cover with a prop.102- [theming.md](theming.md) `ForgeProvider` props, `ForgeTheme` fields, default `darkTheme` and `lightTheme`, `createTheme`, `useForge`. Read this when configuring the provider or building a custom theme.103- [motion.md](motion.md) the Motion library (`Motion`, `AnimatePresence`, `Stagger`, gesture, scroll, text/visual effects, canvas backgrounds, motion hooks). Read this when adding animations.104- [patterns.md](patterns.md) full compositions for dashboards, forms, responsive sidebars, list-with-actions, plus quality gates per pattern and block creation rules. Read this when building a page, not a single component.105- [a11y.md](a11y.md) accessibility playbook: what Forge adds automatically per component and what the dev must still add. Read this when working on any interactive surface.106- [anti-patterns.md](anti-patterns.md) wrong/right pairs for the most common mistakes. Skim this when you are about to write a styled native element, a flex div, a `@media` query, or a hardcoded color.107- [design.md](design.md) design rules and the reasoning behind them. Read this when choosing between multiple valid approaches or when the user asks "why".108- [migration.md](migration.md) upgrade notes from previous versions. Read this when bumping `wss3-forge`.109- [faq.md](faq.md) common gotchas and their fixes (unstyled components, 404s, wrong sizes). Read this when something does not behave as expected.110111## Typical flow1121131. Read the user's request.1142. Open [components.md](components.md) and find the primitive that matches. If the request is a composition, open [patterns.md](patterns.md) first.1153. If the primitive needs a color, radius, or spacing you cannot express with a prop, open [tokens.md](tokens.md).1164. If the request involves animation, open [motion.md](motion.md).1175. If the request touches theming or provider configuration, open [theming.md](theming.md).1186. If the request is interactive (form, menu, dialog, table), skim [a11y.md](a11y.md).1197. Write the code. Run through the Review priority and Pre-delivery checklist. Run `tsc --noEmit` before claiming done.120121## Blocks122123Block templates live under `src/pages/blocks/blocks/{category}/{slug}/`. Categories: `marketing | dashboard | auth | commerce | settings | content | utility`. Block creation rules are documented in [patterns.md](patterns.md#block-creation).