Skip to content
DocsChartsHorizontal barsLast updated Nov 2, 2026

Horizontal bars

Items in a list, with room for their names. Sample data: parcels delivered at five hubs against the scheduled count, Rotterdam 1,312.

Open in
Deliveries by hubParcels delivered today of those scheduled, across 5 hubs: 4,645 of 5,440; Rotterdam delivered the most at 1,312 of 1,480.04008001.2K1.6KROTTERDAM1,312HAMBURG1,034ANTWERP1,046LYON598MILAN655DELIVEREDSCHEDULED
Deliveries by hub
HubDeliveredScheduled
Rotterdam1,3121,480
Hamburg1,0341,260
Antwerp1,0461,120
Lyon598860
Milan655720
Deliveries by hubParcels delivered today of those scheduled, across 5 hubs: 4,645 of 5,440; Rotterdam delivered the most at 1,312 of 1,480.04008001.2K1.6KROTTERDAM1,312HAMBURG1,034ANTWERP1,046LYON598MILAN655DELIVEREDSCHEDULED
Deliveries by hub
HubDeliveredScheduled
Rotterdam1,3121,480
Hamburg1,0341,260
Antwerp1,0461,120
Lyon598860
Milan655720

Installation

  1. 1

    Set up the registry once

    This chart is free in Hearth and MIT licensed: no token. Add @chartory to components.json once (the URL alone, no headers), or skip this when another chart is already installed.

    Installation guide
  2. 2

    Add the chart

    One command adds the Horizontal bars component to your project.

    npx shadcn add @chartory/horizontal-bars
  3. 3

    Use it

    Pass your rows. The props are the Figma properties.

    usage.tsx
    import { HorizontalBars }  from "@/components/chartory/horizontal-bars"<HorizontalBars  data={hubDeliveries}  size="m"  legend/>

Props

<HorizontalBars>

Every prop but data is a Figma property with the same name and values.

PropTypeDefault
data: The chart's data. The tables below list every field.HorizontalBarsDataRequired
size: The size class. Each one is laid out again from the data."xs" | "s" | "m" | "l""m"
legend: Shows the legend row under the plot.booleantrue
color: The data colour of the primary marks (data/primary)."cat-1" | "cat-2" | "cat-3" | "cat-4""cat-1"

HorizontalBarsData

The data prop: one object for the whole chart.

PropTypeDefault
max: The top of the value scale.numberRequired
ticks: The axis tick labels.string[]Required
tokTotal: The colour token of the totals.stringRequired
tokValue: The colour token of the values.stringRequired
valueCol?: The width of the value column, in px.number72
rows: One entry per row.HorizontalBarsRow[]Required

HorizontalBarsRow

One object per entry in rows.

PropTypeDefault
label: The name shown on the chart.stringRequired
total: The total.numberRequired
value: The value as shown.numberRequired
text: The label as shown.stringRequired

The data as a JSON Schema: schemas/horizontal-bars.json

Horizontal bar chart: a React and Figma chart in four sizes

What does a horizontal bar chart show?

A horizontal bar chart lays bars sideways, so long item names fit and the list reads top to bottom. Use it for ranked lists such as hubs, products or teams, especially when there are more than a handful.

Chartory ships it as a Figma component and a React component with the same name. The code installs from the shadcn registry with one command and lands in your project as a file you own.

What is the Horizontal bars component?

It is one <HorizontalBars> component. Its props are the Figma properties with the same names and values, and the props table above lists them. The data is one value and a scheduled total per item.

Sizes XS, S, M and L re-lay the chart out from the data instead of scaling it, so labels stay readable at every size.

When should I use it?

  • Are the items not periods of time? Yes means the horizontal bars fit.
  • Is there one value per item? Yes means the horizontal bars fit.
  • Is it the value alone, with no target? Yes means the horizontal bars fit.

When does another type fit better?

  • Periods read left to right. Use Bars instead.
  • Two values per item to compare. Use Dumbbell instead.
  • Targets with ranges. Use Bullet instead.

Horizontal bar questions

Installing, data, Figma and plans.

  • Yes. It installs through the shadcn registry with the shadcn CLI, and the file lands in your project.

Stay in the loop

New charts, by email.

Get an email when new chart types and releases ship.

Unsubscribe any time.