Skip to content

Breakdown

How a total splits into parts: one stacked bar and a list with each part’s value and share.

Traffic by source

  • Search18,42046%
  • Direct11,21028%
  • Referrals6,81017%
  • Email3,6009%

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/breakdown.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-breakdownThe bar and its list.
mn-breakdown-barThe stacked bar. Each <i> takes --v, its share.
mn-breakdown-listOne row per part, in the same order: label, value (<b>), share (<small>). The swatch is drawn for you.

Accessibility

  • The bar is role="img" with an aria-label listing the shares; the list is the accessible version of the same data.
  • Keep the list and the bar in the same order so position, not only colour, links them.
  • Four series colours are distinct; a fifth and later parts share a neutral: group small parts as “Other”.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page