Tide Meter
Web (React)
A vertical level meter whose fill sloshes as it moves.
The vessel is a muted column with a hairline edge, filled with the primary colour and read out in mono numerals. Drag or use arrow keys to set the level.
Installation
CLI
npx @modus-ui/cli add tide-meterManual
- Copy the code from the component tab.
- Create a file at
components/ui/tide-meter.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | any | - | - |
| defaultValue | number | 60 | - |
| onChange | any | - | - |
| interactive | boolean | true | - |
| showValue | boolean | true | - |
| disabled | boolean | false | - |
| liquidColor | string | "hsl(var(--primary))" | - |
| glassColor | string | "hsl(var(--muted))" | - |
| width | number | 76 | - |
| height | number | 200 | - |
| radius | number | 12 | - |
| ticks | number | 4 | - |
| viscosity | number | 0.15 | - |
| tilt | number | 0.45 | - |
| splash | number | 0.42 | - |
| unit | string | "%" | - |
| ariaLabel | string | "Level" | - |
Comments