Meter
Usage
Use the value
prop from 0
to 100
to set a value for the meter bar.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Min & Max
By default, min
is 0
and max
is 100
. You can change either of these using their respective props, even for negative numbers.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Indicator
You may show a percentage indicator on top of the meter using the indicator
prop.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Label
Add a label below the meter using the label
prop.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Icon
You may also add an icon to the start label using the icon
prop.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Size
Change the size of the meter bar using the size
prop.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Style
The color
prop changes the visual style of the meter bar. The color
can be any color from the ui.colors
object.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Group
To group multiple meters into a group, adding all values, use the MeterGroup
component.
- To change the overall minimum and maximum value, pass the
min
andmax
props respectively. - To change size of all meters, use the
size
prop. - To show an indicator for the overall amount, set the
indicator
prop or slot. - To change the color of each meter, use the
color
prop. - To show a label for each meter, use the
label
prop on each meter. - To change the icon for each meter, use the
icon
prop.
- System (19%)
- Apps (6%)
- Documents (9%)
- Multimedia (33%)
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
A Meter group can also be used with an indicator slot, and even individual meter icons.
86GB used
42GB remaining
- System (19%)
- Apps (6%)
- Documents (9%)
- Multimedia (33%)
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Slots
indicator
Use the #indicator
slot to change the indicator shown at the top of the bar. It receives the current meter percent.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
label
The label
slot can be used to change how the label below the meter bar is shown. It receives the current meter percent.
You are using 84GB (65%) of space
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Props
{}
config.default.size
0
null
config.default.color
"primary"
"white"
"gray"
"black"
"red"
"orange"
"amber"
"yellow"
"lime"
"green"
"emerald"
"teal"
"cyan"
"sky"
"blue"
"indigo"
"violet"
"purple"
"fuchsia"
"pink"
"rose"
null
0
100
false
Config
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }