Figma UI kit
Domain and AI

Status logic

v1.2.1

Map what a record is doing to one status hue, used the same way on every screen.

Quick usage

Import the shared component; never copy its markup into a feature. The Web TSX tab beside the live stage has a complete, working example.

import Indicator from '@/shared/components/Indicator';

Live stage and code

The live component and its controls on the left, the code on the right; change a control and the code follows: Web TSX (the component in a working example), Tailwind and HTML (the markup it renders, with its data attributes), React Native, SwiftUI and Jetpack Compose. The header theme switch drives every stage.

Props

Read from the component's source when the docs build: names and defaults from its signature, types and descriptions from its JSDoc. A blank type means the prop has no JSDoc yet.

PropTypeDefaultDescription
family'status-pill''status-pill'Variant axis; only status-pill is built (see above).
origin'human'|'ai''human'ai adds the 1px info accent border, nothing else.
style'neutral'|'success'|'warning'|'error'|'info''neutral'-
state'static'|'editable-rest'|'editable-hover'|'editable-active''static'-
className---
children---
...rest--Any other prop is passed through to the root element.

Source: frontend/src/shared/components/Indicator/Indicator.js

DOM contract

What the rendered element carries: the data attributes its styles key on, its roles and ARIA, its focus style, and whether its stylesheet draws the 44px hit boundary. Also read from the source.

Data attributesdata-familydata-origindata-statedata-style
RolesNative element semantics only
ARIANone set by the component
FocusNo :focus-visible rule of its own
44px hit boundaryNot a pressable root

Accessibility and touch

Passive; a status is never the target.

Status logic is passive: it reports a condition and is not pressed, so it has no hit boundary. If a design makes it pressable, it gains the 44 by 44 boundary and is marked /* ds-chip: why */.

Do and avoid

Do
ReceivedReset
Do: spend a status hue only on a condition, and keep ordinary actions neutral.
Avoid
ReceivedReset
Avoid: an amber Reset button. It claims danger for a routine undo and leaves a real warning nothing to outrank.

Rules and constraints

Use it for

  • Job and quote stages, receiving states, task states.

Avoid

  • Never a colour that disagrees with the status chip for the same state elsewhere.
  • Never a status hue as decoration or to style an action.

Constraints

  • Green active, amber needs a person, red failed or overdue, blue informational.
  • A live state carries the pulsing dot; a settled one does not.

More in Domain and AI