Calm motion: animations on this site only fade, with no movement
Battery level
The charge of a battery, with charging and low states
Shows the battery of a device, a sensor, or a phone. Put it on a device tile or in a list of devices.
Basic
levelis the charge from 0 to 100. The percent shows next to the battery shape.chargingadds the word "Charging".- At or below
low(default 20), and not on charge, the battery is red and says "Low". - The battery is a meter. Screen readers hear its name, such as "Battery, Door sensor", and the value with the states, such as "14%, Low".
labelgives the device. - Change the words with
labelsor a label pack:battery,charging, andlow.
Usage
ts
import { BlessBatteryLevel } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
level* | number | — | the charge, 0 to 100 |
charging | boolean | — | |
low | number | 20 | at or below this level, the battery is low |
label | string | — | what the battery is in, for example "Door sensor" |
labels | Partial<{ battery: string; charging: string; low: string; }> | — |