Display · Indicatorstable
Indicator
A small coloured dot with an optional label that shows status at a glance. Five intents and three sizes. Without a label the dot stands alone and needs an accessible name.
Preview
#previewChange the options and the code follows. Show code opens the React snippet.
Active
indicator-example.tsx
import { Indicator } from "@blade-ai/weft/components/indicator";
<Indicator>Active</Indicator>All states
#all-statesEvery intent, three sizes and a label-less dot, from the Indicator artboard.
Props
#propsRead from the component source. Booleans are is-prefixed. A star marks a required prop.
Prop
Type
Default
Description
intent
"positive" | "negative" | "notice" | "information" | "neutral"
"neutral"
Meaning of the dot; sets its colour.
size
"small" | "medium" | "large"
"medium"
Dot 6 / 8 / 10px with a 12 / 14 / 16px label.
children
ReactNode
—
Text beside the dot. Without a label the dot stands alone and needs accessibilityLabel.
accessibilityLabel
string
—
Accessible name for a label-less dot (e.g. "3 unread"). Ignored when there is a label.
Usage
#usageShort rules for choosing and writing indicator.
Do
Map each status to one intent across the product.
Add a text label whenever there is room.
Give a label-less dot an accessibilityLabel such as "3 unread".
Don't
Use colour alone to carry the meaning.
Use an indicator as a button.
Mix sizes in the same list.
Accessibility
#accessibilityThe label carries the meaning; a lone dot is named with accessibilityLabel.
ARIA
Element
Role / attribute
When
Indicator with label
text
The dot is decorative.
Label-less indicator
role="img" · aria-label = accessibilityLabel
Required, because a dot alone has no text.
Colour
never alone
Keep the text label so status survives without colour.