Phoundry UI

StatusCheckbox

Multi-state checkbox that snaps between first/last on click and cycles through all states with Ctrl/Cmd+click. Each state can use an Iconify icon and a CSS color.

import { StatusCheckbox } from 'phoundry-ui';

Default three states

Key: unchecked

Click to snap between unchecked and checked; Ctrl/Cmd+click cycles all states.

Show code
<StatusCheckbox bind:activeKey />

Custom workflow states

Key: todo
Show code
<StatusCheckbox bind:activeKey states={workflowStates} ariaLabelPrefix="Task" />

Props

PropTypeDefaultDescription
activeKey requiredstringCurrent state key (bindable)
states StatusCheckboxStateDef[]Ordered states for cycle/snap; defaults to unchecked / indeterminate / checked
fallbackChar stringCharacter shown when activeKey is not in states (gray box)
disabled booleanfalsePrevents interaction
size 'sm' | 'md''sm'Indicator box (~14px sm / ~16px md display size)
ariaLabelPrefix stringPrepended to state label for aria-label (e.g. "Task")
onchange (key: string, event?: MouseEvent) => voidCalled after cycle or snap with the new key
class stringAdditional CSS classes on the button
element HTMLButtonElementBindable reference to the control button