Indicator
A small dot indicator with small information that can be positioned on top of other components.
Usage
Indicator Props
Prop | Type | Default |
---|---|---|
variant | "accent" | "warning" | "danger" | "success" | "neutral" | "accent" |
label | string | - |
ariaLabel | string | - |
children | ReactNode | - |
className | string | - |
Examples
Variant
The Indicator component supports different variants to convey different states or meanings:
Label
When no label is provided, the Indicator will show as a dot
Accessibility
The Indicator component includes several accessibility features:
- Uses
role="status"
to indicate its purpose to screen readers - Provides appropriate
aria-label
based on the content:- Uses custom
ariaLabel
prop if provided - Falls back to the label text if available
- Uses a default "indicator" if neither is provided
- Uses custom
- Hides decorative dot from screen readers when no label is present
Example with custom aria label: