Skip to Content
Kokonut UI

IN-07Inputs

Liquid Slider

A vertical slider you fill like a glass, with a sloshing surface and rising bubbles.

Install with
no extra packages

PRONatural Date Input and more like it are in Kokonut UI Pro

Installation

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

npx shadcn@latest add @kokonutui/liquid-slider

Usage

import LiquidSlider from "@/components/kokonutui/liquid-slider";

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

Props

value
number
defaultValue
numberDefault 1250
onValueChange
(value: number) => void
min
numberDefault 0
max
numberDefault 2000
step
numberDefault 50
unit
stringDefault "ml"

Shown after the number.

label
stringDefault "Water today"
formatValue
(value: number) => stringDefault defaultFormat

Formats the readout and aria-valuetext.

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.