TidalUI

Number input preview

A numeric field with increment and decrement controls.

pro · Forms · primitive

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/number-stepper

Import components/ui/tidal.css, components/ui/number-stepper.css. Wrap installed components in tidal-scope.

Preview

Number input component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/number-stepper.css";
import{TidalNumberStepper}from"./components/ui/number-stepper";
export default()=><div className="tidal-scope"><TidalNumberStepper label={"Demo"} onValueChange={() => {}} value={1}/></div>;

API and props

TidalNumberDigits.text (required)
string

Required text value accepted by this exported component.

TidalNumberStepper.label (required)
string

Required label value accepted by this exported component.

TidalNumberStepper.onValueChange (required)
(value: number | null) => void

Callback invoked when the value change interaction is proposed.

TidalNumberStepper.value (required)
number | null

Required value value accepted by this exported component.

TidalNumberStepper.decreaseLabel
string | undefined

Optional decrease label value accepted by this exported component.

TidalNumberStepper.description
string | undefined

Optional description value accepted by this exported component.

TidalNumberStepper.error
string | undefined

Optional error value accepted by this exported component.

TidalNumberStepper.formatValue
((value: number) => string) | undefined

Optional format value value accepted by this exported component.

TidalNumberStepper.increaseLabel
string | undefined

Optional increase label value accepted by this exported component.

TidalNumberStepper.max
number | undefined

Optional max value accepted by this exported component.

TidalNumberStepper.min
number | undefined

Optional min value accepted by this exported component.

TidalNumberStepper.rootClassName
string | undefined

Optional root class name value accepted by this exported component.

TidalNumberStepper.step
number | undefined

Optional step value accepted by this exported component.

TidalNumberStepper.unit
string | undefined

Optional unit value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas