Loading preview
Floating Label Input
InputsA text field whose label sits inside and floats above on focus or when filled.
A number field with minus and plus buttons, clamped to a range.
npx shadcn@latest add @venusui/number-stepperRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/number-stepper.tsxThe code behind the preview above.
number-stepper-demo.tsx
import { NumberStepper } from "@/components/ui/number-stepper"
export default function NumberStepperDemo() {
return <NumberStepper label="Seats" defaultValue={3} min={1} max={20} />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Visible label. Required. |
| value | number | — | Controlled value. |
| defaultValue | number | 0 | Initial value. |
| onValueChange | (value: number) => void | — | Called with the clamped value. |
| min | number | 0 | Lowest value. |
| max | number | 99 | Highest value. |
| step | number | 1 | Amount per click. |
Only the props above, plus className.
lucide-react, React 19 and Tailwind CSS v4.w-14) for larger numbers.min/max as you type.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A text field whose label sits inside and floats above on focus or when filled.
One-time code entry in separate boxes with paste, autofill and keyboard navigation.
A lock-screen passcode keypad that shakes on a wrong code and unlocks on the right one.