Skip to content

DocsCharts AStage bars

PT

Charts A

Stage bars

Stages as horizontal bars with an icon, value and share, plus tiles.

data-u="stages"Family A

Example

Stage bars

The sales funnel as horizontal bars with an icon, value and share for each stage, plus a grid of tiles.

Installation

Just this chart, with the core and the tokens:

curl -fsSL unslop.leallabs.dev/i | sh -s add stages

No dependency The chart file already brings its own shell.

The full card from the example, as HTML ready to paste:

curl -fsSL unslop.leallabs.dev/i | sh -s add chart-stages

Family A: shell u-chart-card > u-chart-panel > the data-u, then h3.u-chart-title and p.u-chart-desc.

Props

They go in data-u-props, as JSON. Each item in periods becomes an option in the picker and the chart animates from the old data to the new.

PropTypeDefaultWhat it does
labelstringno defaultSmall label at the top of the card.
stagesarrayno defaultList of {label, icon}. icon: eye, user-plus, bolt, crown, users or building (anything else falls back to eye).
periodsarrayno defaultList of {label, delta, values}.
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
chart svgrole="img" and aria-label"Label by stage".
period togglerole="radiogroup", role="radio"Current period in aria-checked.
period listrole="listbox", role="option"Opens with aria-expanded and marks the option in aria-selected.

Keyboard

KeyDoes
Left and right arrowschange the period in the toggle
Enter or Spaceopens the period list
Up and down arrowsmoves through the options
Esccloses without changing
Tabcloses and moves focus on

Events and API

No public events. The period change happens inside the card.

Type to search. Arrows pick, Enter opens.