Modus UI

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.

Modus / Tide Meter

Installation

CLI

npx @modus-ui/cli add tide-meter

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/tide-meter.tsx.
  3. Paste the code.

Usage

tsx
import { TideMeter } from "@/components/ui/tide-meter";

export default function Example() {
  return <TideMeter />;
}

Props

PropTypeDefaultDescription
valueany--
defaultValuenumber60-
onChangeany--
interactivebooleantrue-
showValuebooleantrue-
disabledbooleanfalse-
liquidColorstring"hsl(var(--primary))"-
glassColorstring"hsl(var(--muted))"-
widthnumber76-
heightnumber200-
radiusnumber12-
ticksnumber4-
viscositynumber0.15-
tiltnumber0.45-
splashnumber0.42-
unitstring"%"-
ariaLabelstring"Level"-

Comments

  • No comments yet.