MiHCM
data/@mihcm/ui·v0.21.0·stable

CategoryBar

Segmented distribution bar for allocation, status, and risk summaries with optional legend and tokenized segment classes.

Props

The full prop API for CategoryBar. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.

PropTypeDefaultDescriptionSince
dataCategoryBarItem[]—Segments with label, value, and optional className.0.12.0
valueFormatter(value: number, percentage: number) => ReactNode—Formats legend values.0.12.0
showLegendbooleantrueShow or hide the legend.0.12.0
legendPosition'top' | 'bottom''bottom'Legend placement relative to the bar.0.12.0
barClassNamestring—Tokenized Tailwind classes for the track.0.12.0
classNamestring—Additional Tailwind classes on the root wrapper.0.12.0

Import

import { CategoryBar } from '@mihcm/ui/CategoryBar';