Component specifications
Build from documented contracts.
Every public primitive is documented as a visual system, an interaction contract, and a production implementation. Search the library or browse by responsibility.
22 entries
Actions & feedback
5 documented contracts
Button / buttonStyles
Triggers an action with a consistent visual hierarchy.
Badge
Displays a short status or classification label.
Notice
Communicates an informational, success, warning, or error message.
Skeleton
Reserves space while content is loading.
ErrorReport
Presents a user-facing error with optional copyable diagnostics.
Layout & content
2 documented contracts
Fields & selection
7 documented contracts
Field family / style helpers
Builds consistently labelled and described form controls.
Checkbox
Controls an independent boolean choice.
RadioGroup
Selects exactly one option from a set.
Toggle
Switches a setting between on and off.
Slider
Selects a numeric value within a range.
Dropdown
Selects one value from a compact list.
Tabs / useTabPanelProps
Switches between related views without leaving the page.
Overlays
4 documented contracts
Dialog
Presents focused content above the current page.
Modal family
Composes a themed modal from overlay, panel, header, body, and footer.
ConfirmDialog
Confirms a consequential action with explicit cancel and confirm controls.
Tooltip
Provides brief supplemental information for a trigger.
Theme & media
2 documented contracts
Utilities & motion
2 documented contracts
Components
These are the shared production patterns exported from @ai-created/ui.
Component Rules
- -Start with shared primitives: Button, Surface, TextInput, and TextArea carry the interaction contract.
- -Prefer existing shells before inventing a new card style.
- -Do not add checklist components for completeness. A new shared component should answer a real product need, not a hypothetical one.
- -Keep metadata systems compact and mono-driven: status, platform, date, category, read time.
- -For multi-tool product surfaces, prefer overview cards plus one active workspace instead of stacking every tool vertically.
- -If an action has nowhere useful to go yet, disable it or replace it with explanatory copy. Do not ship dead-end clicks.
- -Dense toolbars should use same-height controls and shared alignment before introducing custom flourishes.
- -Use the accent token for emphasis and state. Use the action token for filled controls with the on-action foreground.
- -Route-level composition counts as a component decision. Shared shells are part of the system, not implementation trivia.
- -Interactive components need visible focus, explicit naming, and correct HTML semantics before they are considered done.
- -If a component only appears on one route, question whether it should be part of the design system at all.
When to Add a Component
This system grows by product pressure, not by checklist completeness. New components should be promoted when the pattern is real, repeated, or clearly cross-route.
Component admission rule
- -First use: solve the product problem with existing primitives and route-level composition.
- -Second similar use: identify the repeated interaction, content shape, and accessibility contract.
- -Shared or repeated use: promote it into a canonical component, then document it here and in DESIGN-SYSTEM.md in the same pass.
- -Patterns learned from shipped product flows belong here once they repeat: capacity states, status-first settings cards, overview-plus-workspace, and honest empty states.
- -Badges, dropdowns, radio groups, sliders, toggles, dialogs, and tooltips are shared primitives. Tooltip + Badge is the standard composition for interactive status pills.
Use the real product need first.
Add the shared primitive or variant.
Ship the full accessibility and state contract.
Document it in the playground and in DESIGN-SYSTEM.md.
Status & Loading
Async feedback uses a shared notice primitive and a small skeleton primitive instead of ad hoc status markup.
Saved changes
Sync in progress
ThemedHeroImage
Shared hero media wrapper. Every route-level hero uses this single primitive. It handles dark/light image swapping, overlay strength, edge fade gradients, and transparent-PNG blending, all backed by design system tokens.
default is the standard overlay for most browse pages.
strong is heavier, used for high-contrast moments.
soft is 20% more transparent than strong, for subtler image presence.
fadeBottom blends the hero edge into the page background.
fadeTop same effect at the top.
blendLight uses mix-blend-multiply on images in light mode so transparent PNGs blend into the warm beige background.
Form Controls
FieldGroup owns one vertical spacing rhythm so text controls, hints, and adjacent Dropdown triggers stay aligned across content and states.
Results update as you type.
Keep the rationale concise and actionable.
Choose an owner before release.
Browse Controls
Search plus low-friction filters are the preferred pattern when a route needs more than a simple grid.
Tabs
Horizontal tab bar for switching between related views. Uses roving tabindex with arrow-key navigation, Home/End support, and proper ARIA tab pattern.
Checkbox
Binary toggle with a visually hidden native input and a styled indicator. Focus-visible outlines appear on the visual box. Labels are always required for accessibility.
Dropdown
Single-select dropdown built on Headless UI Listbox. Full keyboard navigation with Arrow Up/Down, Enter/Space to select, Escape to close, and type-ahead search.
Radio Group
Single-select group using native radio inputs in a fieldset. Arrow keys move selection. Styled indicators follow the checkbox visual pattern with a centered dot.
Slider
Range input with a styled track and thumb. The filled portion uses the accent action color. Includes an output element for the current value with aria-valuetext for screen readers.
Toggle
On/off switch visually distinct from checkboxes. Uses role='switch' with aria-checked. Sliding track animation with the accent action color for the on state.
Badge
Pill-shaped semantic label for status indicators, counters, and metadata tags. Six variants map to the semantic color system.
Dialog
Modal dialog built on Headless UI with automatic focus trap, Escape to close, backdrop click to close, and transition animations. Size variants from sm to xl.
Modal composition
The composable Modal family keeps flexible header, body, and footer layouts while owning portal, focus, Escape, backdrop, and restoration behavior.
ConfirmDialog
Use the pre-composed alert dialog when an action needs an explicit confirm or cancel decision.
No action selected.
Semantic feedback
Notice variants communicate system state through text, role, icon, border, surface, and color together.
Draft saved
Import running
Changes published
Review required
Publish failed
EmptyState
The shared empty-state primitive pairs direct explanation with one useful next action.
No projects yet
Create a project when you are ready to collect sources and notes.
ErrorReport
An actionable error surface with optional progressive disclosure and copyable debug context.
Something went wrong
The workspace could not be synchronized.
ThemedHeroImage live state
This constrained preview uses the same decorative, theme-aware media primitive as the page hero.
Decorative media
One composition, both themes.
Images stay outside the reading order while overlays preserve readable foreground content.
Tooltip
Contextual hint that appears on hover and focus. Configurable position and delay. Uses role='tooltip' with aria-describedby for screen reader support.
Tooltip + Badge
Badges wrapped in Tooltip create interactive status pills with explanatory hover text. Use cursor-help to signal the tooltip is available. This composition is the standard pattern for audit metadata and status indicators.
Card Hover System
Cards follow a consistent hover progression: border brightens, text lifts in contrast, and images scale subtly. Use the group selector for coordinated effects.
Dividers
Three divider weights for different contexts. Structural for lists, decorative for subtle breaks, accent for emphasis.
Empty States
When filters or search return nothing, show a direct, non-cute message. Always provide context or a way forward.
No articles found.
Try adjusting your search or clearing filters.
Icon Sizing
Icons follow three size tiers. Small for inline metadata, medium for interactive controls, large for decorative or standalone use.
Accessibility By Component
- -Buttons and links must keep visible focus and communicate destination or action clearly.
- -Buttons ship with default, hover, focus-visible, loading, and disabled states. The design system should show those states, not imply them.
- -Disabled actions should communicate why they are unavailable when the user needs more context. Do not force navigation into empty destinations.
- -Cards that act as links should expose one clear accessible name and treat supporting imagery as decorative.
- -Forms require labels, helper copy when needed, autocomplete where appropriate, and success/error announcements.
- -Browse controls should use real fieldsets, legends, pressed states, and live feedback when results change.
- -Workflow tabs and utility actions should not share the same semantic tablist unless they represent the same kind of destination.
- -Mixed toolbars still need consistent hit targets and alignment. Buttons, dropdowns, and icon actions should share height when they occupy one control row.
- -Modals must trap focus, restore focus on close, support Escape to dismiss, and use role="dialog" with aria-modal and aria-labelledby.
- -Tabs use role="tablist" with arrow-key navigation, Home/End support, and roving tabindex. Each tab has role="tab", aria-selected, and aria-controls linking to its panel.
- -Checkboxes pair a visually hidden native input with a styled indicator. Focus-visible outlines render on the visual box via peer selectors. Labels are always required.
- -Empty states must communicate clearly to screen readers. Avoid placeholder SVGs without alt text.
- -Breadcrumbs use nav with aria-label="Breadcrumb" and plain text for the current page.
- -Dropdowns use Headless UI Listbox with full keyboard navigation (Arrow Up/Down, Enter, Escape, type-ahead). Selected option shows a check icon.
- -Radio groups use native radio inputs in a fieldset with legend. Arrow keys move selection. Styled indicators mirror the checkbox pattern with a centered dot.
- -Sliders use native range input with a styled track and thumb. The filled portion uses the accent action color. aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext are set.
- -Toggles use role="switch" with aria-checked. Visually distinct from checkboxes with a sliding track. Focus-visible outline on the track.
- -Dialogs use Headless UI Dialog with automatic focus trap, Escape to close, backdrop click to close, and transition animations. Close button has an aria-label.
- -Tooltips appear on hover and focus with a configurable delay. Use role="tooltip" with aria-describedby on the trigger. Positioned top/bottom/left/right.
- -Badges are inline semantic labels. When wrapped in Tooltip, add cursor-help so users know hover detail is available. The Tooltip provides aria-describedby on the Badge automatically.

