NumberInput
@stellaria/nebula-webNumberInputPropsPreview
Props
19| Prop | Type | Default |
|---|---|---|
decrementLabel | string | "Decrease" |
defaultValue | number | Number.NaN |
description | ReactNode | — |
disabled | boolean | false |
error | string | boolean | — |
errorDisplay | ErrorDisplay | "tooltip" |
field | NebulaField<number> | — |
hideControls | boolean | false |
incrementLabel | string | "Increase" |
label | ReactNode | — |
max | number | — |
min | number | — |
onChange | ((value: number) => void) | — |
required | boolean | false |
rootClassName | string | — |
size | Size | "md" |
step | number | 1 |
surface | FieldSurface | "outline" |
value | number | — |
Slot props
9Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
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.