Slider
@stellaria/nebula-webSliderPropsPreview
Props
23| Prop | Type | Default |
|---|---|---|
className | string | — |
color | ColorExtended | "primary" |
defaultValue | number | 0 |
description | ReactNode | — |
disabled | boolean | false |
error | string | boolean | — |
errorDisplay | ErrorDisplay | "tooltip" |
field | NebulaField<number> | — |
formatValue | ((value: number) => string) | — |
label | ReactNode | — |
marks | readonly SliderMark[] | — |
max | number | 100 |
min | number | 0 |
name | string | — |
onChange | ((value: number) => void) | — |
onChangeEnd | ((value: number) => void) | — |
required | boolean | false |
rootClassName | string | — |
size | Size | "md" |
step | number | 1 |
value | number | — |
variant | SliderVariant | — |
withValue | boolean | true |
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 | — |
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 | — |
labelProps The field label. It lands on the `<label>`, which already carries the control `htmlFor`. | TextSlotProps | — |
markProps Every mark. It spreads over ALL of them. Its position along the axis is written AFTER the slot, because it comes from its `value`; colour and typography can be set here or inherited from `marksProps`. | BoxSlotProps | — |
marksProps The row of marks. Only rendered with `marks`. | BoxSlotProps | — |
outputProps The value shown beside it. Only with `withValue`; it announces itself, because it is an `output`. | TextSlotProps | — |
requiredProps The required asterisk, which lives inside the label. Only rendered with `required`. | BoxSlotProps | — |
Also accepts
On top of its own props, this component forwards these groups.