SubComponents

Bar

To render the progress bar in the Meter.

Bar API

Props
Type
Required

percentage

number

variant

'default' | 'primary' | 'scaled'

scales

{
  safe?: number;
  warning?: number;
  danger?: number;
};

percentage

A value between 1-100 that is passed to represent the current value.

Scales

The scales prop is an object passed to represent limits by changing the progress color. By default, if you pass the 'scaled' variant, the object limits will be like this:

const defaultScales = {
    safe: 50,
    warning: 75,
    danger: 100,
 };

Label

The label subcomponent does not extend the SDS label component.

Label API

This subcomponent extends the native label props.

Props
Type
Required

children

ReactNode

children

The renderd string or structure passed as child.

Last updated