uibrik

Stepper Button

Preview

Customize

Max9
Solid
Medium
Radius12px

Usage

import { StepperButton } from "@/components/uibrik/stepper-button/stepper-button";

<StepperButton />

Installation

npx shadcn@latest add https://uibrik.com/r/stepper-button.json
Adds the files to components/uibrik/stepper-button and installs @number-flow/react, @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/stepper-button.

Props

StepperButton
label
Type string
"Add to cart"
Button text.
max
Type number
9
Highest quantity allowed.
variant
Type "solid" | "soft" | "outline"
"solid"
Primary, or a quieter look.
size
Type "sm" | "md" | "lg"
"md"
Height, padding and text size.
trashAtOne
Type boolean
true
At one, show a trash icon in place of minus, since the next tap removes it.
radius
Type number
12
Corner radius.
defaultValue
Type number
0
Starting quantity. 0 shows the add button.
onChange
Type (quantity: number) => void
–
Called with the new quantity after each change.
className
Type string
–
Classes for the wrapper.