Liquid Gauge, animated React component
A storage meter drawn as liquid in a glass orb, with two rolling wave layers, rising bubbles and a surface that leans toward the pointer. The percentage is drawn twice so the part under the liquid turns white, and changing the level sloshes it.
- Pro
- Dashboards
- Hover
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
136 GB of 200 GB usedPlenty of room left.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| total | number | 200 | Capacity of the store, in units. |
| defaultUsed | number | 136 | Amount used on first render, clamped to 0..total. |
| accent | string | "#0a84ff" | Liquid colour while usage is below warnAt. |
| warnAt | number | 85 | Percentage at which the liquid turns orange and the caption warns. |
| unit | string | "GB" | Unit shown in the caption. |
| onChange | (used: number) => void | — | Called with the new amount after Clean up (-40) or Add files (+30). |
| autoplay | boolean | false | Sloshes through a few fill levels until someone presses a button. |