Capacity

Display an capacity indicator.

General

The basic Capacity usage.

Fixed Color

Specify a color to override the default.

Plan usage

Pair each Capacity with a label and the numbers. limit is the full bar, and the color changes by itself as it fills.

APIs

Capacity.Props

AttributeDescriptionTypeAccepted valuesDefault
valuevalue numbernumber-0
limitmax valuenumber-100
colorcss color stringstring--
...native propsHTMLAttributes'className', ...-

Accessibility

  • • Without a name the bar is a plain div, so a screen reader does not announce it. Pass an aria-label or aria-labelledby, such as aria-label="Storage used", and it becomes a meter with aria-valuenow as the value, aria-valuemin 0 and aria-valuemax as the limit.
Edit this page on GitHub