Liquid Slider - React Component | Kokonut UI

Liquid Slider

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

Install with

npx shadcn@latest add https://kokonutui.com/r/liquid-slider.json

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

Prop Type Default
value number -
defaultValue number 1250
onValueChange (value: number) => void -
min number 0
max number 2000
step number 50
unit string "ml"
label string "Water today"
formatValue (value: number) => string defaultFormat
className string -

Dependencies

Needs Version Comes from
cn from lib/utils.ts - shadcn init
React 19 Your app
Tailwind CSS 4 Your app

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