Skip to content

DocsCharts AFunnel

PT

Charts A

Funnel

Stages with a layered halo and the conversion between columns.

data-u="funnel"Family A

Example

Funnel chart

Stages with a layered halo and conversion pills, smooth curves or sharp cuts, and tiles with each column's number.

Installation

Just this chart, with the core and the tokens:

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

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-funnel

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.
curvebooleantrueSmooth curve between stages. false gives straight cuts.
stagesarrayno defaultList of {label}, one per stage.
periodsarrayno defaultList of {label, delta, values}. One value per stage.
periodnumber0Index of the period that opens selected.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
chart svgrole="img" and aria-label"Label: stage value, ..." with the stage numbers.
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.