Component specs
The components Primer specifies. The apps implement them.
Detailed core guidance covers navigation, buttons, fields, menus, popovers, dialogs and cards; remaining specs are outlines. Each spec names variants, sizes, states, keyboard behavior, composition guidance, and the public roles each part uses. Applications keep their components and behavior; these specs are what a review compares them against. Source: specs/*.yaml.
avatar
Outline for application review
A person or account mark. The image has a text alternative.
Sizes: small-100, base, large-100. States: rest.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.strong |
| default | root | color | color.text.base |
| default | root | radius | radius.full |
badge
Outline for application review
A short status label with softly rounded corners. Text states the status. Color is not the only signal.
Sizes: small-100. States: rest.
| Variant | Part | Property | Role |
|---|---|---|---|
| neutral | root | background | color.background.strong |
| neutral | root | color | color.text.base |
| accent | root | background | color.accent.fill |
| accent | root | color | color.accent.on-fill |
| critical | root | background | color.critical.fill |
| critical | root | color | color.critical.on-fill |
button
Core guidance
Starts an action. Enter and Space activate. A disabled button does not.
Sizes: small-100, base, large-100. States: rest, hover, focus, disabled, pressed, loading.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.accent.fill |
| default | root | color | color.accent.on-fill |
| default | root | radius | control.radius |
| default | root | min-height | control.min-height |
| default | hover | background | color.accent.fill-hover |
| default | disabled | opacity | opacity.disabled |
| destructive | root | background | color.critical.fill |
| destructive | root | color | color.critical.on-fill |
| destructive | hover | background | color.critical.fill |
| outline | root | background | color.background.base |
| outline | root | color | color.text.base |
| outline | root | border | color.border.base |
| outline | hover | background | color.background.strong |
| secondary | root | background | color.background.strong |
| secondary | root | color | color.text.base |
| secondary | hover | background | color.background.strong |
| ghost | root | color | color.text.base |
| ghost | hover | background | color.background.strong |
| link | root | color | color.accent.base |
| link | hover | background | color.background.strong |
- core anatomy
- control, label, optional icon.
- core behavior
- Native Enter and Space activate; disabled and loading actions must not activate. Keep icon decoration hidden from assistive technology and expose loading status.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
card
Core guidance
A grouped surface. If the card is a link, the whole card is one tab stop.
Sizes: base. States: rest, hover.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.base |
| default | root | color | color.text.base |
| default | root | border | color.border.subdued |
| default | root | radius | radius.base |
- core anatomy
- surface, heading, content, optional independent action.
- core behavior
- Keep secondary actions visible to keyboard and touch. Do not nest controls inside a link; preserve readable order and 44px action targets.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
desktop-navigation
Core guidance
Stable left navigation beside a spacious workspace, with labeled and compact rail compositions. Give the navigation a name. Tab follows the visual order; Enter activates a destination. Use aria-current for the active destination, not tablist semantics. Every icon-only control has an accessible name and a tooltip on hover and focus. Menus, search, and narrow navigation return focus to their opener when dismissed.
Sizes: labeled, compact. States: rest, hover, current, focus, disabled.
| Variant | Part | Property | Role |
|---|---|---|---|
| labeled | rail | width | desktop.navigation.width |
| labeled | rail | narrow-width | desktop.navigation.width-narrow |
| labeled | rail | background | desktop.sidebar |
| labeled | rail | inset | desktop.navigation.inset |
| labeled | rail | group-gap | desktop.navigation.group-gap |
| labeled | item | minimum-height | desktop.navigation.target-size |
| labeled | item | gap | desktop.navigation.item-gap |
| labeled | item | color | desktop.muted |
| labeled | item | font-size | desktop.navigation.label-size |
| labeled | item | radius | desktop.radius.control |
| labeled | icon | size | desktop.navigation.icon-size |
| labeled | current | background | desktop.selection |
| labeled | current | color | desktop.selection-text |
| labeled | current | weight | font.weight.bold |
| labeled | hover | background | desktop.inset |
| labeled | hover | color | desktop.text |
| labeled | focus | outline | desktop.focus |
| compact | rail | width | desktop.navigation.compact-width |
| compact | rail | background | desktop.sidebar |
| compact | rail | group-gap | desktop.navigation.group-gap |
| compact | item | minimum-width | desktop.navigation.target-size |
| compact | item | minimum-height | desktop.navigation.target-size |
| compact | item | gap | desktop.navigation.item-gap |
| compact | item | color | desktop.muted |
| compact | item | radius | desktop.radius.control |
| compact | icon | size | desktop.navigation.icon-size |
| compact | current | background | desktop.selection |
| compact | current | color | desktop.selection-text |
| compact | hover | background | desktop.inset |
| compact | hover | color | desktop.text |
| compact | focus | outline | desktop.focus |
- anatomy
- Place application identity and global search first, a short stable set of primary destinations next, and global utilities at the bottom. Keep the navigation body independently scrollable when needed. Do not repeat global destinations in a second top navigation row.
- hierarchy
- Use labels by default when destinations are unfamiliar or numerous. A compact rail is appropriate for a few familiar destinations with stable icons. Product collections, saved views, and selected-item detail are contextual content, not reasons to fill every available rail slot.
- current
- Current location remains visible even when it is reached through search or More. Pair a quiet selected fill with a persistent shape, icon weight, indicator, or text weight; do not rely on hue alone. Use aria-current on destinations and aria-expanded only on controls that open a menu or navigation layer.
- groups
- Use spacing to separate meaningful groups. Group labels are optional and should describe the contents. Avoid decorative categories, full-width accent panels, and a divider between every item.
- utilities
- Settings, activity, and account controls keep stable positions. Badges represent actionable or ongoing state, not decorative scores. Include the badge meaning in the accessible name. Keep urgent errors in the relevant content and a retrievable activity record.
- responsive
- Reduce page margins and labeled navigation width before changing text or target sizes. Choose a compact rail only when icons remain understandable; otherwise use a named navigation button that opens a focus-managed layer. Preserve destination, drafts, selection, and scroll state across changes. Native traffic lights need their own clearance, including when the rail narrows.
- actions
- Navigation changes location; a creation action creates content. Keep those roles visually and semantically distinct. Local search and page-specific actions belong with their content. Secondary row actions must work by keyboard and touch as well as hover.
- density
- Rail density and content density are independent. The shared navigation reference uses 44px targets, 20px icons, and 14px labels. Tally's existing 48px rail and 36px targets are documented product evidence, not the comfortable cross-app target contract.
- scope
- This spec defines shared decisions and review criteria. Applications own their navigation components, routing, persistence, native window regions, tooltips, and responsive behavior; Primer does not render a rail.
- core anatomy
- navigation landmark, destinations, current indicator, utilities.
- core behavior
- Use aria-current for location, names for icon actions, and 44px touch targets. On narrow screens use a named focus-managed drawer and restore focus.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
desktop-shell
Outline for application review
Calm native desktop foundations with generous content spacing and independent navigation compositions. Use named navigation landmarks, aria-current for destinations, visible keyboard focus, and logical focus order. Never make the content area draggable.
Sizes: base, comfortable. States: rest, selected, focus.
| Variant | Part | Property | Role |
|---|---|---|---|
| open-canvas | root | background | desktop.layout.open-canvas.canvas |
| open-canvas | root | color | desktop.layout.open-canvas.text |
| open-canvas | root | font | font.interface |
| open-canvas | root | font-size | desktop.density.comfortable.font-size |
| open-canvas | toolbar | height | desktop.layout.open-canvas.toolbar-height |
| open-canvas | toolbar | background | desktop.layout.open-canvas.toolbar |
| open-canvas | toolbar | separator | desktop.layout.open-canvas.separator |
| open-canvas | navigation | background | desktop.layout.open-canvas.sidebar |
| open-canvas | navigation | width | desktop.navigation.width |
| open-canvas | navigation | narrow-width | desktop.navigation.width-narrow |
| open-canvas | navigation | minimum-target | desktop.navigation.target-size |
| open-canvas | page | max-content-width | desktop.layout.open-canvas.content-width |
| open-canvas | page | spacing | desktop.density.comfortable.content-space |
| open-canvas | page | narrow-spacing | desktop.density.comfortable.content-space-narrow |
| open-canvas | page | title-size | desktop.layout.open-canvas.title-size |
| open-canvas | page | narrow-title-size | desktop.layout.open-canvas.title-size-narrow |
| open-canvas | context | width | desktop.layout.open-canvas.detail-width |
| open-canvas | context | narrow-width | desktop.layout.open-canvas.detail-width-narrow |
| open-canvas | context | spacing | desktop.layout.open-canvas.context-space |
| open-canvas | context | narrow-spacing | desktop.layout.open-canvas.context-space-narrow |
| open-canvas | context | separator | desktop.layout.open-canvas.separator |
| open-canvas | selection | background | desktop.layout.open-canvas.selection |
| open-canvas | selection | color | desktop.layout.open-canvas.selection-text |
| open-canvas | selection | radius | desktop.radius.control |
| open-canvas | control | height | desktop.density.comfortable.control-height |
| open-canvas | control | radius | desktop.radius.control |
| open-canvas | control | focus | desktop.focus |
| native | root | background | desktop.canvas |
| native | root | color | desktop.text |
| native | root | font | font.interface |
| native | root | spacing | desktop.content-space |
| native | sidebar | background | desktop.sidebar |
| native | sidebar | width | desktop.sidebar-width |
| native | panel | background | desktop.surface |
| native | panel | radius | desktop.radius.panel |
| native | panel | shadow | desktop.shadow.panel |
| native | panel | spacing | desktop.section-space |
| native | selection | background | desktop.selection |
| native | selection | color | desktop.selection-text |
| native | selection | radius | desktop.radius.control |
| native | control | height | desktop.control-height |
| native | control | radius | desktop.radius.control |
| native | control | focus | desktop.focus |
| comfortable | root | background | desktop.canvas |
| comfortable | root | color | desktop.text |
| comfortable | root | font | font.interface |
| comfortable | root | font-size | desktop.density.comfortable.font-size |
| comfortable | sidebar | background | desktop.sidebar |
| comfortable | sidebar | width | desktop.density.comfortable.sidebar-width |
| comfortable | sidebar | narrow-width | desktop.density.comfortable.sidebar-width-narrow |
| comfortable | sidebar | row-height | desktop.density.comfortable.row-height |
| comfortable | page | max-width | desktop.density.comfortable.content-width |
| comfortable | page | spacing | desktop.density.comfortable.content-space |
| comfortable | page | narrow-spacing | desktop.density.comfortable.content-space-narrow |
| comfortable | section | spacing | desktop.density.comfortable.section-space |
| comfortable | row | height | desktop.density.comfortable.row-height |
| comfortable | row | color | desktop.text |
| comfortable | row | supporting-size | desktop.supporting-size |
| comfortable | row | supporting-color | desktop.muted |
| comfortable | row | selection | desktop.selection |
| comfortable | row | selection-text | desktop.selection-text |
| comfortable | quiet-action | color | desktop.muted |
| comfortable | quiet-action | focus | desktop.focus |
| comfortable | quiet-action | height | desktop.density.comfortable.control-height |
| comfortable | control | height | desktop.density.comfortable.control-height |
| comfortable | control | radius | desktop.radius.control |
| comfortable | control | focus | desktop.focus |
- navigation
- Open-canvas describes surfaces and content measures, independently of navigation. A left rail keeps stable destinations beside the workspace; the desktop-navigation spec defines labeled and compact variants. A toolbar-only composition remains available for a small set of destinations. Choose one primary navigation location. Put occasional destinations in a named, searchable picker and keep the current destination discoverable. Use aria-current for destinations; reserve tab semantics for actual tab panels.
- content
- Use a focused content width and plain sections separated by space. Reserve raised surfaces for distinct layers such as dialogs, popovers, or editing regions.
- context
- Show detail beside a selected list item only when it is useful. Use a single hairline and generous space, not a surrounding card. At narrow widths stack or present detail through a named action while preserving keyboard access and selection.
- actions
- Keep the primary action available. Move secondary actions into a named menu and reveal row actions on both hover and keyboard focus; touch users must have an equivalent visible route.
- home
- Show real recent content, saved places, or useful next actions. Do not use fabricated recency, idle connection badges, or repeated navigation tiles to fill space.
- responsive
- Reduce page margins and contextual or sidebar width before text or target sizes. If navigation no longer fits, use an understandable compact rail or a named navigation layer with focus restoration. A toolbar-only composition wraps or supplies an accessible overflow route. Long labels wrap or remain accessible. Editors and data tables can use more width than the reading measure. Keep native window dragging separate from navigation and controls.
dialog
Core guidance
A modal that keeps focus until it closes. Focus stays inside. Escape closes. Focus returns to the opener.
Sizes: base. States: open, closed.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | overlay | background | color.overlay |
| default | overlay | opacity | opacity.overlay |
| default | panel | background | color.shell.raised |
| default | panel | color | color.text.base |
| default | panel | radius | shell-radius.panel |
- core anatomy
- trigger, named dialog, content, actions.
- core behavior
- Contain focus while modal, support Escape and restore focus to the opener. Keep primary and secondary actions reachable on narrow screens.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
folio-header
Core guidance
A page title and context with optional actions. Tab reaches actions in visual order with a visible focus indicator.
Sizes: base. States: rest, focus.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.base |
| default | root | color | color.text.base |
| default | root | reading-measure | workspace.reading-measure |
| default | supporting | color | color.text.subdued |
| default | action | focus | color.focus |
| default | title | size | workspace.title-desktop |
| default | title | narrow-size | workspace.title-mobile |
| default | title | weight | font.page-weight |
| default | artwork | width | workspace.desktop-art |
| default | artwork | height | workspace.desktop-art |
| default | artwork | narrow-width | workspace.phone-art-width |
| default | artwork | narrow-height | workspace.phone-art-height |
- anatomy
- Group a page title, optional context or artwork, and related actions in a header.
- behavior
- Give icon actions names and use native buttons or links. Keep actions reachable by keyboard and touch with 44px targets.
- responsive
- On desktop place workspace.desktop-art beside the heading. At workspace.folio-breakpoint and below use workspace.phone-art-width by workspace.phone-art-height before a full-width workspace.title-mobile title, then wrap actions below. Preserve reading order and focus.
input
Core guidance
A single-line text field. The field is in the tab order. The label is visible or named.
Sizes: base. States: rest, focus, disabled, invalid, hover, read-only.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.base |
| default | root | color | color.text.base |
| default | root | border | color.border.base |
| default | root | focus | color.focus |
| default | root | radius | control.radius |
| default | root | min-height | control.min-height |
| default | invalid | border | color.critical.base |
| default | invalid | message | color.critical.base |
| default | read-only | background | color.background.strong |
| default | disabled | opacity | opacity.disabled |
- core anatomy
- label, field, help, error.
- core behavior
- Keep a visible associated label. Tab reaches the field; associate specific validation feedback and set aria-invalid when invalid.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
list-row
Core guidance
A compact item with independently reachable actions. Tab reaches each link and action in visual order. Do not nest controls.
Sizes: base. States: rest, hover, focus, selected.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.base |
| default | root | color | color.text.base |
| default | root | border | color.border.subdued |
| default | title | font-size | control.font-size |
| default | meta | color | color.text.subdued |
| default | meta | font-size | control.meta-size |
| default | hover | background | color.background.strong |
| default | selected | background | color.background.strong |
| default | selected | weight | font.weight.bold |
| default | action | color | color.text.subdued |
| default | action | focus | color.focus |
- anatomy
- A row contains a primary label, optional supporting content, and separate secondary actions.
- behavior
- Keep secondary actions available by keyboard, pointer, and touch without relying on hover. Give icon actions accessible names and 44px targets.
- responsive
- Wrap or truncate supporting content before removing actions. Keep focus visible and the reading order stable.
menu
Core guidance
A list of actions. Arrow keys move. Enter activates. Escape closes.
Sizes: base. States: open, closed.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | panel | background | color.shell.raised |
| default | panel | color | color.text.base |
| default | panel | border | color.border.subdued |
| default | item | color | color.text.base |
- core anatomy
- trigger, menu, menu items.
- core behavior
- Expose expanded state. Arrow keys move between items; Escape closes and restores focus. Pointer and touch can reach every item.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
popover
Core guidance
A non-modal panel anchored to a control. Escape closes. Focus can move into the panel.
Sizes: base. States: open, closed.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | panel | background | color.shell.raised |
| default | panel | color | color.text.base |
| default | panel | border | color.border.subdued |
| default | panel | radius | radius.base |
- core anatomy
- trigger, anchored surface, content.
- core behavior
- Expose expanded state and dismiss on Escape or outside interaction as appropriate. Restore focus when dismissal moves it; do not trap focus in a nonmodal popover.
- core responsive
- Preserve reading order, visible focus, labels and usable touch targets when space narrows.
select
Outline for application review
Chooses one option from a list. Arrow keys move. Enter selects. Escape closes.
Sizes: base. States: rest, open, focus, disabled.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | trigger | background | color.background.base |
| default | trigger | color | color.text.base |
| default | trigger | border | color.border.base |
| default | item | background | color.background.base |
| default | item | color | color.text.base |
switch
Outline for application review
Turns a setting on or off. Space toggles. The state is announced.
Sizes: base. States: on, off, focus, disabled.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | track | background | color.background.strong |
| default | on | background | color.accent.fill |
| default | thumb | background | color.accent.on-fill |
tabs
Outline for application review
Switches a panel without leaving the page. Arrow keys move between tabs. The selected tab is named.
Sizes: base. States: selected, rest, focus.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | tab | color | color.text.subdued |
| default | selected | color | color.text.base |
| default | selected | border | color.accent.base |
| default | panel | color | color.text.base |
toast
Outline for application review
A temporary status message. A toast with an action can be focused. Status is text, not color alone.
Sizes: base. States: open, closed.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.base |
| default | root | color | color.text.base |
| default | root | border | color.border.base |
| critical | root | background | color.background.base |
| critical | root | color | color.critical.base |
tooltip
Outline for application review
A short label for a control that already has a name. Shown on focus as well as hover. It is not the only name.
Sizes: small-100. States: open, closed.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | root | background | color.background.strong |
| default | root | color | color.text.base |
| default | root | radius | radius.small-100 |
workspace-nav
Core guidance
Web navigation beside the working surface. Below the drawer breakpoint it becomes a focus-managed drawer. Name the navigation. Tab follows visual order. Enter activates a destination. aria-current marks the active destination. Escape closes the drawer and focus returns to the opener.
Sizes: base. States: rest, hover, current, focus.
| Variant | Part | Property | Role |
|---|---|---|---|
| default | rail | width | workspace.sidebar |
| default | rail | background | color.shell.panel |
| default | rail | padding | control.page-inset-narrow |
| default | rail | gap | control.nav-gap |
| default | rail | section-gap | control.section-gap |
| default | item | min-height | control.min-height |
| default | item | padding-block | control.padding-block |
| default | item | padding-inline | control.padding-inline |
| default | item | gap | control.gap |
| default | item | radius | control.radius |
| default | item | color | color.text.base |
| default | item | font-size | control.font-size |
| default | item | font-weight | control.font-weight |
| default | current | background | color.background.strong |
| default | hover | background | color.background.strong |
| default | canvas | background | color.shell.canvas |
| default | canvas | gap | workspace.shell-gap |
| default | drawer | max | workspace.drawer-max |
| default | drawer | fraction | drawer.width-viewport-fraction |
| default | drawer | breakpoint | workspace.drawer-breakpoint |
- core anatomy
- navigation landmark, destinations, current item, menu button, dismiss layer.
- core behavior
- Use aria-current for the active destination. The menu button opens the drawer, moves focus into it, and Escape returns focus to that button.
- core responsive
- At workspace.drawer-breakpoint and below, the rail becomes a drawer of min(workspace.drawer-max, drawer.width-viewport-fraction of the viewport). The working surface uses control.page-inset, then control.page-inset-narrow.