Liquid Toggle

A toggle with a liquid/blob-like transition. The internal shape deforms organically as it travels from off to on — stretching along the travel axis and settling into a natural blob shape rather than simply translating.

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/liquid-toggle

API Reference

PropTypeDefaultDescription
valuebooleanundefinedControlled value
defaultValuebooleanfalseInitial value for uncontrolled mode
onChange(value: boolean) => voidundefinedToggle change callback
disabledbooleanfalseDisabled state
offLabelstring'Off'Screen reader label when off
onLabelstring'On'Screen reader label when on
accentColorstring'#FAFAFA'Blob color when on
showLabelsbooleantrueShow OFF/ON text inside the track
widthnumber56Track width in px
heightnumber32Track height in px