Skip to content
Inputs & Forms

Slider

client48.25 kB
@stellaria/nebula-webSliderProps

Preview

Props

23
PropTypeDefault

className

string

—

color

ColorExtended"primary"

defaultValue

number0

description

ReactNode

—

disabled

booleanfalse

error

string | boolean

—

errorDisplay

ErrorDisplay"tooltip"

field

NebulaField<number>

—

formatValue

((value: number) => string)

—

label

ReactNode

—

marks

readonly SliderMark[]

—

max

number100

min

number0

name

string

—

onChange

((value: number) => void)

—

onChangeEnd

((value: number) => void)

—

required

booleanfalse

rootClassName

string

—

size

Size"md"

step

number1

value

number

—

variant

SliderVariant

—

withValue

booleantrue

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

—

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.

Style props · 127