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.
API reference
Generated from the types. Every part also takes className.
ShareBar
- segmentsrequired
ShareSegment[]- labelrequired
stringWhat the bar shows, e.g. "Images by use". The accessible name, and the heading whenlegendis on.- total
numberDefaults to the sum of the segments. Larger when part of the whole is not shown.- legend
boolean = falseShow the label, the total and a legend under the bar.- unit
stringAfter the total: "images".- size
"sm" | "md" = "md"sm: 8 px, for a table cell; md: 10 px.- locale
stringFormats the numbers and shares (a BCP 47 tag such as "zh-TW"). Left out, the browser's language.