Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Adaptive Stepper

Preview

Quantity. Current value: 2
2

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/adaptive-stepper

Import the shared styles once in your application.

TSUsage
import AdaptiveStepper from '@/components/beui/layout/AdaptiveStepper.vue'
import '@/components/beui/styles.css'

API Reference

AdaptiveStepper

v-model?
number

Controlled value. Leave it unbound for an uncontrolled stepper that starts at `defaultValue`.

Default—
defaultValue?
number
Default0
@value-change?
(value: number) => void
Default—
min?
number
Default0
max?
number
Default10
step?
number
Default1
disabled?
boolean
Defaultfalse
name?
string
Default—
formatValueText?
(value: number) => string

Formats the screen-reader value; the visible number stays plain.

Default—
class?
string
Default—
aria-label?
string

Accessible name of the control.

Default—
labels?
Partial<AdaptiveStepperMessages>

Override any built-in string. `{label}` and `{value}` fill `summary`.

Default—
label?
string

Alias of `aria-label`.

Default—
#default?
slot

The three parts: `AdaptiveStepperDecrement`, `AdaptiveStepperValue` and `AdaptiveStepperIncrement`. Omit it for the default layout.

Default—
#value?
slot

Custom display of the value in the default layout.

Default—
#decrement?
slot

Icon of the decrement button in the default layout.

Default—
#increment?
slot

Icon of the increment button in the default layout.

Default—

AdaptiveStepperDecrement

@click?
((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void)
Default—
class?
string
Default—
#default?
slot

Icon of the button. Defaults to a minus.

Default—

AdaptiveStepperValue

class?
string
Default—
#default?
slot

Custom display for the value. Plain text rolls with the step; markup swaps in place.

Default—

AdaptiveStepperIncrement

@click?
((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void)
Default—
class?
string
Default—
#default?
slot

Icon of the button. Defaults to a plus.

Default—

Updated