Contracts

Components

Framework-neutral component contracts for core controls, regions, and states.

Specimens
17

Rendered from current contracts.

States
6

Required state names across components.

Bindings
10

Token roles tied to component behavior.

Usage

Use component contracts to choose the smallest interface primitive that supports the work. These contracts describe behavior, state, and review evidence; they are not a renderer package.

Specimens

Each specimen pairs a rendered preview with required state coverage, anatomy, token roles, and source evidence from the current contract.

Component specimen

Action button

Trigger one bounded user action

Open
ready
disabled
focus visible
loading
Anatomy
  • visible label
  • optional icon
  • state affordance
Tokens
  • text
  • border
  • focus
  • decision
  • risk

Component specimen

Action group

Group related actions with clear priority and boundaries

Open
ready
Case action
disabled
Case action
focus visible
Case action
Anatomy
  • primary action
  • secondary actions
  • group label or context
Tokens
  • decision
  • risk
  • border
  • spacing

Component specimen

Form field

Collect one labeled value with help, error, and disabled affordances

Open
empty
ready
error
disabled
focus visible
Anatomy
  • label
  • control
  • help text
  • error text
Tokens
  • text
  • border
  • focus
  • status
  • disabled

Component specimen

Text field

Collect short text or numeric values

Open
empty
ready
error
disabled
focus visible
Anatomy
  • label
  • input
  • help text
  • error text
Tokens
  • text
  • border
  • focus
  • status

Component specimen

Text area

Collect longer written input

Open
empty
ready
error
disabled
focus visible
Anatomy
  • label
  • multi-line control
  • help text
  • error text
Tokens
  • text
  • border
  • focus
  • spacing

Component specimen

Select field

Choose one value from a bounded option set

Open
empty
ready
error
disabled
focus visible
Anatomy
  • label
  • trigger or native select
  • options
  • help or error text
Tokens
  • text
  • border
  • focus
  • surface

Component specimen

Checkbox group

Choose independent options from a set

Open
ready
Evidence present Choose all evidence sources.
error
Evidence present Select at least one evidence source.
disabled
Evidence present Choose all evidence sources.
focus visible
Evidence present Choose all evidence sources.
Anatomy
  • legend
  • checkbox options
  • help or error text
Tokens
  • text
  • border
  • focus
  • spacing

Component specimen

Radio group

Choose exactly one option from a set

Open
empty
Outcome Select one decision.
ready
Outcome Select one decision.
error
Outcome Choose one outcome.
disabled
Outcome Select one decision.
focus visible
Outcome Select one decision.
Anatomy
  • legend
  • radio options
  • help or error text
Tokens
  • text
  • border
  • focus
  • spacing

Component specimen

Toggle

Switch a binary setting on or off

Open
ready
disabled
focus visible
Anatomy
  • visible label
  • switch control
  • current state text
Tokens
  • status
  • focus
  • disabled

Component specimen

Tabs

Switch between peer sections without changing the task object

Open
ready
Receipt and approval evidence.
disabled
Receipt and approval evidence.
focus visible
Receipt and approval evidence.
Anatomy
  • tab list
  • tabs
  • active tab
  • tab panels
Tokens
  • surface
  • border
  • focus
  • text

Component specimen

Dialog

Interrupt the current surface for a bounded decision or focused form

Open
ready
loading
error
focus visible
Anatomy
  • title
  • body
  • dismiss action
  • primary action
Tokens
  • surface
  • border
  • focus
  • decision
  • risk

Component specimen

Alert

Call attention to important status, risk, or required action

Open
ready

Case is ready for review.

focus visible

Case is ready for review.

Anatomy
  • status indicator
  • message
  • optional action
Tokens
  • status
  • risk
  • receipt
  • text

Component specimen

Table

Compare structured rows and columns

Open
empty
Escalation queue
CaseStatus
No casesReady
No work waiting.
ready
Escalation queue
CaseStatus
RF-1842Ready
1 case shown.
loading
Escalation queue
CaseStatus
RF-1842Loading
1 case shown.
error
Escalation queue
CaseStatus
RF-1842Needs repair
1 case shown.
focus visible
Escalation queue
CaseStatus
RF-1842Ready
1 case shown.
Anatomy
  • caption or heading
  • headers
  • rows
  • cells
  • empty state
Tokens
  • surface
  • border
  • text
  • spacing

Component specimen

Panel

Group related work, evidence, or controls in a bounded region

Open
ready

Evidence

Receipt, policy, and customer note are grouped here.

loading

Evidence

Loading evidence.

error

Evidence

Evidence conflict needs review.

Anatomy
  • heading
  • content region
  • optional actions
Tokens
  • surface
  • border
  • spacing
  • text

Component specimen

Card

Summarize one repeated item or choice

Open
ready

Refund RF-1842

Policy exception with receipt evidence.

Updated 4 min ago
disabled

Refund RF-1842

Policy exception with receipt evidence.

Updated 4 min ago
focus visible

Refund RF-1842

Policy exception with receipt evidence.

Updated 4 min ago
Anatomy
  • item title
  • summary
  • metadata
  • optional action
Tokens
  • surface
  • border
  • spacing
  • text

Component specimen

Status message

Report progress, result, validation, or completion

Open
ready
Ready Decision can be handed off.
loading
Saving Decision can be handed off.
error
Anatomy
  • status text
  • severity or result
  • optional next action
Tokens
  • status
  • risk
  • receipt
  • text

Component contracts

Core UI component contracts
ComponentPurposeStatesReview
action_button
Action button
Trigger one bounded user actionready, disabled, focus-visible, loadingaction comes from the workflow; risky actions have approval-boundary evidence
action_group
Action group
Group related actions with clear priority and boundariesready, disabled, focus-visibleprimary action is singular; secondary actions remain adjacent to their object
form_field
Form field
Collect one labeled value with help, error, and disabled affordancesempty, ready, error, disabled, focus-visiblelabel uses domain vocabulary; disabled reason is readable
text_field
Text field
Collect short text or numeric valuesempty, ready, error, disabled, focus-visibleinput type matches the value; validation is visible and textual
text_area
Text area
Collect longer written inputempty, ready, error, disabled, focus-visibleexpected content is clear; long content does not collapse nearby controls
select_field
Select field
Choose one value from a bounded option setempty, ready, error, disabled, focus-visibleempty option is clear when optional; selected value is visible
checkbox_group
Checkbox group
Choose independent options from a setready, error, disabled, focus-visiblelong labels wrap cleanly; options remain independent
radio_group
Radio group
Choose exactly one option from a setempty, ready, error, disabled, focus-visibleoption labels are comparable; default selection is intentional
toggle
Toggle
Switch a binary setting on or offready, disabled, focus-visiblelabel names the setting; state change is reversible or bounded
tabs
Tabs
Switch between peer sections without changing the task objectready, disabled, focus-visibletabs are peers; active state is visible
menu
Menu
Reveal a compact set of contextual commandsready, disabled, focus-visiblecommands are contextual; primary path remains visible
dialog
Dialog
Interrupt the current surface for a bounded decision or focused formready, loading, error, focus-visibleprimary action is visually final; cancel or dismiss precedes primary action
alert
Alert
Call attention to important status, risk, or required actionready, focus-visibleseverity matches the action needed; message explains next step
table
Table
Compare structured rows and columnsempty, ready, loading, error, focus-visiblecolumns support decisions; empty and loading states are clear
panel
Panel
Group related work, evidence, or controls in a bounded regionready, loading, errorpanel groups one coherent concern; actions are adjacent to content
card
Card
Summarize one repeated item or choiceready, disabled, focus-visiblecard represents one object; interactive area is clear
status_message
Status message
Report progress, result, validation, or completionready, loading, errormessage names the user-relevant result; completion leaves a receipt

Review checks

  • Use only known component contract ids when citing component evidence.
  • Provide required state coverage for every component contract used.
  • Keep risky action evidence separate from component evidence.
  • Do not use renderer or component-library compliance as proof of activity fit.

Accessibility

  • Controls need accessible names, keyboard operation, visible focus, and target-size evidence.
  • Forms need labels, instructions, text errors, and status messages.
  • Dialogs, menus, tabs, and custom widgets need name-role-value and focus-management evidence.

Examples

  • Action with a boundary

    Use
    Use an action button when the user can trigger one clear outcome with visible state.
    Watch for
    Do not expose risky or destructive action without approval-boundary evidence.
  • Field with clear state

    Use
    Use field contracts when labels, help, validation, disabled state, and focus must stay together.
    Watch for
    Do not rely on placeholder text or color-only errors.