Skip to content
Primer printing platePrimer

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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.strong
defaultrootcolorcolor.text.base
defaultrootradiusradius.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.

VariantPartPropertyRole
neutralrootbackgroundcolor.background.strong
neutralrootcolorcolor.text.base
accentrootbackgroundcolor.accent.fill
accentrootcolorcolor.accent.on-fill
criticalrootbackgroundcolor.critical.fill
criticalrootcolorcolor.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.accent.fill
defaultrootcolorcolor.accent.on-fill
defaultrootradiuscontrol.radius
defaultrootmin-heightcontrol.min-height
defaulthoverbackgroundcolor.accent.fill-hover
defaultdisabledopacityopacity.disabled
destructiverootbackgroundcolor.critical.fill
destructiverootcolorcolor.critical.on-fill
destructivehoverbackgroundcolor.critical.fill
outlinerootbackgroundcolor.background.base
outlinerootcolorcolor.text.base
outlinerootbordercolor.border.base
outlinehoverbackgroundcolor.background.strong
secondaryrootbackgroundcolor.background.strong
secondaryrootcolorcolor.text.base
secondaryhoverbackgroundcolor.background.strong
ghostrootcolorcolor.text.base
ghosthoverbackgroundcolor.background.strong
linkrootcolorcolor.accent.base
linkhoverbackgroundcolor.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.base
defaultrootcolorcolor.text.base
defaultrootbordercolor.border.subdued
defaultrootradiusradius.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.

VariantPartPropertyRole
labeledrailwidthdesktop.navigation.width
labeledrailnarrow-widthdesktop.navigation.width-narrow
labeledrailbackgrounddesktop.sidebar
labeledrailinsetdesktop.navigation.inset
labeledrailgroup-gapdesktop.navigation.group-gap
labeleditemminimum-heightdesktop.navigation.target-size
labeleditemgapdesktop.navigation.item-gap
labeleditemcolordesktop.muted
labeleditemfont-sizedesktop.navigation.label-size
labeleditemradiusdesktop.radius.control
labelediconsizedesktop.navigation.icon-size
labeledcurrentbackgrounddesktop.selection
labeledcurrentcolordesktop.selection-text
labeledcurrentweightfont.weight.bold
labeledhoverbackgrounddesktop.inset
labeledhovercolordesktop.text
labeledfocusoutlinedesktop.focus
compactrailwidthdesktop.navigation.compact-width
compactrailbackgrounddesktop.sidebar
compactrailgroup-gapdesktop.navigation.group-gap
compactitemminimum-widthdesktop.navigation.target-size
compactitemminimum-heightdesktop.navigation.target-size
compactitemgapdesktop.navigation.item-gap
compactitemcolordesktop.muted
compactitemradiusdesktop.radius.control
compacticonsizedesktop.navigation.icon-size
compactcurrentbackgrounddesktop.selection
compactcurrentcolordesktop.selection-text
compacthoverbackgrounddesktop.inset
compacthovercolordesktop.text
compactfocusoutlinedesktop.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.

VariantPartPropertyRole
open-canvasrootbackgrounddesktop.layout.open-canvas.canvas
open-canvasrootcolordesktop.layout.open-canvas.text
open-canvasrootfontfont.interface
open-canvasrootfont-sizedesktop.density.comfortable.font-size
open-canvastoolbarheightdesktop.layout.open-canvas.toolbar-height
open-canvastoolbarbackgrounddesktop.layout.open-canvas.toolbar
open-canvastoolbarseparatordesktop.layout.open-canvas.separator
open-canvasnavigationbackgrounddesktop.layout.open-canvas.sidebar
open-canvasnavigationwidthdesktop.navigation.width
open-canvasnavigationnarrow-widthdesktop.navigation.width-narrow
open-canvasnavigationminimum-targetdesktop.navigation.target-size
open-canvaspagemax-content-widthdesktop.layout.open-canvas.content-width
open-canvaspagespacingdesktop.density.comfortable.content-space
open-canvaspagenarrow-spacingdesktop.density.comfortable.content-space-narrow
open-canvaspagetitle-sizedesktop.layout.open-canvas.title-size
open-canvaspagenarrow-title-sizedesktop.layout.open-canvas.title-size-narrow
open-canvascontextwidthdesktop.layout.open-canvas.detail-width
open-canvascontextnarrow-widthdesktop.layout.open-canvas.detail-width-narrow
open-canvascontextspacingdesktop.layout.open-canvas.context-space
open-canvascontextnarrow-spacingdesktop.layout.open-canvas.context-space-narrow
open-canvascontextseparatordesktop.layout.open-canvas.separator
open-canvasselectionbackgrounddesktop.layout.open-canvas.selection
open-canvasselectioncolordesktop.layout.open-canvas.selection-text
open-canvasselectionradiusdesktop.radius.control
open-canvascontrolheightdesktop.density.comfortable.control-height
open-canvascontrolradiusdesktop.radius.control
open-canvascontrolfocusdesktop.focus
nativerootbackgrounddesktop.canvas
nativerootcolordesktop.text
nativerootfontfont.interface
nativerootspacingdesktop.content-space
nativesidebarbackgrounddesktop.sidebar
nativesidebarwidthdesktop.sidebar-width
nativepanelbackgrounddesktop.surface
nativepanelradiusdesktop.radius.panel
nativepanelshadowdesktop.shadow.panel
nativepanelspacingdesktop.section-space
nativeselectionbackgrounddesktop.selection
nativeselectioncolordesktop.selection-text
nativeselectionradiusdesktop.radius.control
nativecontrolheightdesktop.control-height
nativecontrolradiusdesktop.radius.control
nativecontrolfocusdesktop.focus
comfortablerootbackgrounddesktop.canvas
comfortablerootcolordesktop.text
comfortablerootfontfont.interface
comfortablerootfont-sizedesktop.density.comfortable.font-size
comfortablesidebarbackgrounddesktop.sidebar
comfortablesidebarwidthdesktop.density.comfortable.sidebar-width
comfortablesidebarnarrow-widthdesktop.density.comfortable.sidebar-width-narrow
comfortablesidebarrow-heightdesktop.density.comfortable.row-height
comfortablepagemax-widthdesktop.density.comfortable.content-width
comfortablepagespacingdesktop.density.comfortable.content-space
comfortablepagenarrow-spacingdesktop.density.comfortable.content-space-narrow
comfortablesectionspacingdesktop.density.comfortable.section-space
comfortablerowheightdesktop.density.comfortable.row-height
comfortablerowcolordesktop.text
comfortablerowsupporting-sizedesktop.supporting-size
comfortablerowsupporting-colordesktop.muted
comfortablerowselectiondesktop.selection
comfortablerowselection-textdesktop.selection-text
comfortablequiet-actioncolordesktop.muted
comfortablequiet-actionfocusdesktop.focus
comfortablequiet-actionheightdesktop.density.comfortable.control-height
comfortablecontrolheightdesktop.density.comfortable.control-height
comfortablecontrolradiusdesktop.radius.control
comfortablecontrolfocusdesktop.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.

VariantPartPropertyRole
defaultoverlaybackgroundcolor.overlay
defaultoverlayopacityopacity.overlay
defaultpanelbackgroundcolor.shell.raised
defaultpanelcolorcolor.text.base
defaultpanelradiusshell-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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.base
defaultrootcolorcolor.text.base
defaultrootreading-measureworkspace.reading-measure
defaultsupportingcolorcolor.text.subdued
defaultactionfocuscolor.focus
defaulttitlesizeworkspace.title-desktop
defaulttitlenarrow-sizeworkspace.title-mobile
defaulttitleweightfont.page-weight
defaultartworkwidthworkspace.desktop-art
defaultartworkheightworkspace.desktop-art
defaultartworknarrow-widthworkspace.phone-art-width
defaultartworknarrow-heightworkspace.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.base
defaultrootcolorcolor.text.base
defaultrootbordercolor.border.base
defaultrootfocuscolor.focus
defaultrootradiuscontrol.radius
defaultrootmin-heightcontrol.min-height
defaultinvalidbordercolor.critical.base
defaultinvalidmessagecolor.critical.base
defaultread-onlybackgroundcolor.background.strong
defaultdisabledopacityopacity.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.base
defaultrootcolorcolor.text.base
defaultrootbordercolor.border.subdued
defaulttitlefont-sizecontrol.font-size
defaultmetacolorcolor.text.subdued
defaultmetafont-sizecontrol.meta-size
defaulthoverbackgroundcolor.background.strong
defaultselectedbackgroundcolor.background.strong
defaultselectedweightfont.weight.bold
defaultactioncolorcolor.text.subdued
defaultactionfocuscolor.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.

Core guidance

A list of actions. Arrow keys move. Enter activates. Escape closes.

Sizes: base. States: open, closed.

VariantPartPropertyRole
defaultpanelbackgroundcolor.shell.raised
defaultpanelcolorcolor.text.base
defaultpanelbordercolor.border.subdued
defaultitemcolorcolor.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.

VariantPartPropertyRole
defaultpanelbackgroundcolor.shell.raised
defaultpanelcolorcolor.text.base
defaultpanelbordercolor.border.subdued
defaultpanelradiusradius.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.

VariantPartPropertyRole
defaulttriggerbackgroundcolor.background.base
defaulttriggercolorcolor.text.base
defaulttriggerbordercolor.border.base
defaultitembackgroundcolor.background.base
defaultitemcolorcolor.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.

VariantPartPropertyRole
defaulttrackbackgroundcolor.background.strong
defaultonbackgroundcolor.accent.fill
defaultthumbbackgroundcolor.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.

VariantPartPropertyRole
defaulttabcolorcolor.text.subdued
defaultselectedcolorcolor.text.base
defaultselectedbordercolor.accent.base
defaultpanelcolorcolor.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.base
defaultrootcolorcolor.text.base
defaultrootbordercolor.border.base
criticalrootbackgroundcolor.background.base
criticalrootcolorcolor.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.

VariantPartPropertyRole
defaultrootbackgroundcolor.background.strong
defaultrootcolorcolor.text.base
defaultrootradiusradius.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.

VariantPartPropertyRole
defaultrailwidthworkspace.sidebar
defaultrailbackgroundcolor.shell.panel
defaultrailpaddingcontrol.page-inset-narrow
defaultrailgapcontrol.nav-gap
defaultrailsection-gapcontrol.section-gap
defaultitemmin-heightcontrol.min-height
defaultitempadding-blockcontrol.padding-block
defaultitempadding-inlinecontrol.padding-inline
defaultitemgapcontrol.gap
defaultitemradiuscontrol.radius
defaultitemcolorcolor.text.base
defaultitemfont-sizecontrol.font-size
defaultitemfont-weightcontrol.font-weight
defaultcurrentbackgroundcolor.background.strong
defaulthoverbackgroundcolor.background.strong
defaultcanvasbackgroundcolor.shell.canvas
defaultcanvasgapworkspace.shell-gap
defaultdrawermaxworkspace.drawer-max
defaultdrawerfractiondrawer.width-viewport-fraction
defaultdrawerbreakpointworkspace.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.