MeterGroup API

API documentation for MeterGroup component

MeterGroup#

Props#

Defines valid properties in MeterGroup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupInstance) => ReactNode)
null
The children to render.
orientation"horizontal" | "vertical"
horizontal
Specifies the layout of the component.
minnumber
0
Minimum boundary value.
maxnumber
100
Maximum boundary value.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in MeterGroup component.

nametypedefaultdescription
totalPercentnumber
null
The total percentage of the meter group.

Exposes#

Defines the methods and properties exposed by MeterGroup component.

nametypedefaultdescription
colorsRecord<METERGROUP_DEFAULT_COLORS_TYPE, string>
null
getNextColorIndex() => number
null
getNextLabelIndex() => number
null
stateuseMeterGroupState
null
The state of the useMeterGroup.
percent(meterValue: number) => number
null
Converts a meter value to a percentage.
percentAsString(meterValue: number) => string
null
Converts a meter value to a percentage string.
updateTotalPercent(percent: number) => void
null
Updates the total percentage of the meter group.
resetTotalPercent() => void
null
Resets the total percentage of the meter group to 0.

Interfaces#

Defines passthrough(pt) options of MeterGroup component.

nametypedefaultdescription
rootMeterGroupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
metersMeterGroupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the meters' DOM element.
meterMeterGroupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the meter's DOM element.
labelsMeterGroupPassThroughType<HTMLAttributes<HTMLOListElement>>
null
Used to pass attributes to the labels' DOM element.
labelMeterGroupPassThroughType<HTMLAttributes<HTMLLIElement>>
null
Used to pass attributes to the label's DOM element.
iconMeterGroupPassThroughType<HTMLAttributes<HTMLElement>>
null
Used to pass attributes to the label icon's DOM element.
markerMeterGroupPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the label marker's DOM element.
textMeterGroupPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroup component.

values
ComponentInstance<MeterGroupProps, MeterGroupState, MeterGroupExposes>

MeterGroupMeters#

Props#

Defines valid properties in MeterGroupMeters component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupMetersInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupMetersInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupMetersPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupMetersInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupMeters component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupMeters component.

nametypedefaultdescription
rootMeterGroupMetersPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupMeters component.

values
ComponentInstance<MeterGroupMetersProps, MeterGroupMetersState, MeterGroupMetersExposes>

MeterGroupMeter#

Props#

Defines valid properties in MeterGroupMeter component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupMeterInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupMeterInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupMeterPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupMeterInstance) => ReactNode)
null
The children to render.
valuenumber
null
Defines the value of the meter.
colorstring & {} | METERGROUP_DEFAULT_COLORS_TYPE
null
Defines the color of the meter.
indexnumber
null
Defines the index of the meter.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupMeter component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupMeter component.

nametypedefaultdescription
rootMeterGroupMeterPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupMeter component.

values
ComponentInstance<MeterGroupMeterProps, MeterGroupMeterState, MeterGroupMeterExposes>

MeterGroupLabels#

Props#

Defines valid properties in MeterGroupLabels component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupLabelsInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupLabelsInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupLabelsPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupLabelsInstance) => ReactNode)
null
The children to render.
orientation"horizontal" | "vertical"
horizontal
Specifies the label orientation of the component.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupLabels component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupLabels component.

nametypedefaultdescription
rootMeterGroupLabelsPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupLabels component.

values
ComponentInstance<MeterGroupLabelsProps, MeterGroupLabelsState, MeterGroupLabelsExposes>

MeterGroupLabel#

Props#

Defines valid properties in MeterGroupLabel component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupLabelInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupLabelInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupLabelPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupLabelInstance) => ReactNode)
null
The children to render.
colorstring
null
Defines the color of the label.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupLabel component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupLabel component.

nametypedefaultdescription
rootMeterGroupLabelPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupLabel component.

values
ComponentInstance<MeterGroupLabelProps, MeterGroupLabelState, MeterGroupLabelExposes>

MeterGroupIcon#

Props#

Defines valid properties in MeterGroupIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupIconInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupIconPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupIconInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupIcon component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupIcon component.

nametypedefaultdescription
rootMeterGroupIconPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupIcon component.

values
ComponentInstance<MeterGroupIconProps, MeterGroupIconState, MeterGroupIconExposes>

MeterGroupMarker#

Props#

Defines valid properties in MeterGroupMarker component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupMarkerInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupMarkerInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupMarkerPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupMarkerInstance) => ReactNode)
null
The children to render.
colorstring & {} | METERGROUP_DEFAULT_COLORS_TYPE
null
Defines the color of the marker.
indexnumber
null
Defines the index of the marker.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupMarker component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupMarker component.

nametypedefaultdescription
rootMeterGroupMarkerPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupMarker component.

values
ComponentInstance<MeterGroupMarkerProps, MeterGroupMarkerState, MeterGroupMarkerExposes>

MeterGroupText#

Props#

Defines valid properties in MeterGroupText component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: MeterGroupTextInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: MeterGroupTextInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<MeterGroupTextPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: MeterGroupTextInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by MeterGroupText component.

nametypedefaultdescription
metergroupMeterGroupInstance
null
The MeterGroup component instance.

Interfaces#

Defines passthrough(pt) options of MeterGroupText component.

nametypedefaultdescription
rootMeterGroupTextPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of MeterGroupText component.

values
ComponentInstance<MeterGroupTextProps, MeterGroupTextState, MeterGroupTextExposes>

useMeterGroup#

Props#

Defines valid properties in useMeterGroup.

nametypedefaultdescription
minnumber
0
Minimum boundary value.
maxnumber
100
Maximum boundary value.

State#

Defines valid state in useMeterGroup.

nametypedefaultdescription
totalPercentnumber
null
The total percentage of the meter group.

Exposes#

Defines the methods and properties exposed by useMeterGroup.

nametypedefaultdescription
stateuseMeterGroupState
null
The state of the useMeterGroup.
percent(meterValue: number) => number
null
Converts a meter value to a percentage.
percentAsString(meterValue: number) => string
null
Converts a meter value to a percentage string.
updateTotalPercent(percent: number) => void
null
Updates the total percentage of the meter group.
resetTotalPercent() => void
null
Resets the total percentage of the meter group to 0.

Types#

Instance of useMeterGroup headless.

values
HeadlessInstance<useMeterGroupProps, useMeterGroupState, useMeterGroupExposes>