Skip to content
Design System
GitHub

Share bar

v0.23.1Beta

How a whole splits, as one thin bar in the chart palette (the accent, two greys, Other): light enough for a table cell, with an optional label, total and legend.

Images by use22,830 images
  • Train 18,240
  • Validation 2,280
  • Test 2,310

Share bar legend

Install
npx shadcn add @syncrobotic/share-bar

Also installs: @syncrobotic/cn

Overview

How a whole splits into a few parts, as one thin bar, light enough for a table cell.

When to use

  • Images by use, label sources, a dataset's tiers.
  • Inside a table cell without a legend, or on its own with legend.

Use something else

  • Values over time or many categories: Chart.
  • A single level within a range: Meter.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

DatasetLabels: human, model, both
Forklift aisles
Night patrol
Dock cameras

Share bar in table

Usage rules

  • How a whole splits into a few parts (up to three, then “Other”): the first in the accent, then two greys, then the light grey for Other. For values over time or many categories, use a chart.
  • Colours follow the order you give, never the size, and are never status colours.
  • Outside a table cell, show the legend: identity never rests on colour alone. In a table, the column header names the parts.

Changelog

  • 0.23.12026-11-21No unused React import, so the file compiles in projects with noUnusedLocals.
  • 0.23.02026-11-20locale formats the numbers and shares.
  • 0.22.02026-11-20Parts take the accent, two greys, then the Other grey for a fourth part and more (no fifth colour); "other" is --chart-4. The part not shown is its own track segment, so the 2 px gaps show the surface and Other never merges with the track.

How to upgrade