Skip to Content
Kokonut UI

CD-09Cards

Liquid Gauge

A usage meter filled with liquid that sloshes, ripples and bubbles, built with React and a wave simulation.

Install with
no extra packages

PROOnboarding Checklist and more like it are in Kokonut UI Pro

Installation

Liquid Gauge is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/liquid-gauge.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/liquid-gauge

Usage

import LiquidGauge from "@/components/kokonutui/liquid-gauge";

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

Props

value
number

Controlled fill, 0 to 100.

defaultValue
numberDefault 72

Initial fill when uncontrolled.

onValueChange
(value: number) => void
readOnly
booleanDefault false

Turns the gauge into a read-only display.

label
stringDefault "Storage"
total
numberDefault 128

Capacity shown in the subline, in unit.

unit
stringDefault "GB"
warnAt
numberDefault 90

From this fill on, the liquid turns red.

className
string

Extra classes for the root element.

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.