Skip to content

Function: StateBadge()

StateBadge(props): Element

Render an INDI state as a coloured badge (Idle/Ok/Busy/Alert).

The colour comes from data-indi-state, which the theme maps to --indi-state, so this file holds no copy of the state-to-colour table.

relative is the containing block the pulse ring is positioned against, and overflow-visible is what lets the ring leave the badge: twMerge drops the primitive's own overflow-hidden, which would otherwise clip it back to the badge's edge at every frame. Both are unconditional, so nothing about the box changes when the instrument goes Busy.

Parameters

props

StateBadgeProps

The state and optional class name.

Returns

Element

The badge element.