Examples

Discrete

Continuous

Value input

Thumb value input

Actions

Disabled

Types

SliderOnChangeEvent

The slider’s onChange prop accepts an event parameter of the following types:

  • React.MouseEvent
  • React.KeyboardEvent
  • React.FormEvent<HTMLInputElement>
  • React.TouchEvent
  • React.FocusEvent<HTMLInputElement>

The SliderOnChangeEvent type is a union of the above event types, and can be imported and used in your code like in the following code snippet:


<Slider onChange={(event: SliderOnChangeEvent) => {}} />

CSS variables