NumberControls

Component

A component that renders an input element for number controls with optional stepper and slider features.

Usage

// Render number controls with a title and disabled state
<NumberControls title="Quantity" />
// Render number controls with stepper
<NumberControls title="Quantity" stepper onChange={handleQuantityChange} />
// Render number controls with a default value and custom step
<NumberControls defaultValue={10} step={2} onChange={handleQuantityChange} />

Props

defaultValue?

The default value of the number controls.

type

number

onChange?

The callback function that is triggered when the value changes.

type

(value: number) => void

slider?

Whether to show the slider control.

type

boolean

stepper?

Whether to show the stepper controls.

type

boolean

title?

The title of the number controls.

type

string

value?

The value of the number controls.

type

number