Number Field

A glass stepper. Drag its label sideways to scrub the value.

Installation#

pnpmnpmyarnbun
$ pnpm dlx shadcn@latest add @liquikit/number-field

Needs the @liquikit registry in your components.json. Set it up once.

Usage#

import { NumberField } from "@/components/liquikit/number-field"
<NumberField label="Guests" defaultValue={2} min={1} max={12} />

API Reference#

NumberField

PropTypeDefault
theme"light" | "dark"

Light or dark glass. Falls back to the nearest GlassThemeProvider, then light.

—
lensPartial<LensProfile>

Overrides for the lens profile, such as thickness, bevel, ior and magnification.

—
liquidnumber

How far the glass squashes and stretches as it moves. 0 keeps it rigid.

—
labelReactNode

A visible label, wired to the control for assistive technology.

—
refraction"interactive" | "always"

When the glass bends the page. interactive bends it while the component is pressed, dragged or focused, always bends it all the time.

"interactive"

Also takes every prop of Base UI's number field, plus className and style.