Components
Components
BarChart
Categorical bar chart with optional multi-series grouping.
newfree
pnpm add @komponents/uiCanonical TypeScript source · tree-shakeable subpathsBarChart maps categories on a band scale and groups series side-by-side. Heights animate with a spring when motion is enabled.
Usage
Preview
Accessibility
- The SVG is
role="img"named by the requiredsummary, which is also rendered as ansr-onlycaption - Every bar is focusable and labelled
"{series}: {category}, {value}", so the data is reachable with Tab alone - Focus opens the same tooltip as hover, and blur closes it
- Axis ticks and gridlines are
aria-hidden— the summary carries the comparison status="loading"andstatus="empty"announce throughrole="status";status="error"usesrole="alert"