Skip to content

Segmented bar

Pro

One whole in a few parts, as a bar that prints its figures or a thin bar above a list of the parts; parts with an order can take the theme's ramp, lightest to darkest (the reverse in dark mode). Not an M3 component (@windmorph/react-pro).

import { SegmentedBar, SegmentedList } from '@windmorph/react-pro/charts';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Playground

  • Phone
  • Desktop
  • Tablet
  • Television

Code

import { SegmentedBar } from '@windmorph/react-pro/charts'; <SegmentedBar  aria-label="Visits by device"  parts={[    { key: 'phone', label: 'Phone', value: 5120 },    { key: 'desktop', label: 'Desktop', value: 2980 },    { key: 'tablet', label: 'Tablet', value: 610 },    { key: 'tv', label: 'Television', value: 240 },  ]}/>

Examples

Parts of a whole, and more than six folded into "Other"

Answers in order, from "Never" to "Always"

A list of the parts with their shares and amounts