Skip to content
Inputs & Forms

NumberInput

client43.75 kB
@stellaria/nebula-webNumberInputProps

Preview

Props

19
PropTypeDefault

decrementLabel

string"Decrease"

defaultValue

numberNumber.NaN

description

ReactNode

disabled

booleanfalse

error

string | boolean

errorDisplay

ErrorDisplay"tooltip"

field

NebulaField<number>

hideControls

booleanfalse

incrementLabel

string"Increase"

label

ReactNode

max

number

min

number

onChange

((value: number) => void)

required

booleanfalse

rootClassName

string

size

Size"md"

step

number1

surface

FieldSurface"outline"

value

number

Slot props

9

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

bodyProps

Wrapper for the control.

BoxSlotProps

decrementProps

The down arrow. It disables itself on reaching `min`.

UnstyledButtonProps

descriptionProps

Help text below the label. Only rendered with `description`.

TextSlotProps

errorProps

Configures the `FieldError`. With `errorDisplay="tooltip"` it spreads whole; with `"text"` there is no `FieldError` to configure — it is a `Text` with `role="alert"` — and only `className` is honoured.

Omit<FieldErrorProps, "children">

headerProps

The label and description row. Not rendered when the field has neither.

BoxSlotProps

incrementProps

The up arrow. It disables itself on reaching `max`.

UnstyledButtonProps

labelProps

The field label. It lands on the `<label>`, which already carries the control `htmlFor`.

TextSlotProps

requiredProps

The required asterisk, which lives inside the label. Only rendered with `required`.

BoxSlotProps

stepperProps

The column of the two arrows. Not rendered with `hideControls`.

BoxSlotProps

Also accepts

On top of its own props, this component forwards these groups.

HTML attributes · 298Style props · 127