T

SliderRowProps

Props for SliderRow.

type SliderRowProps = { … }

Members

The default, which Discord's slider marks on its track; the section's reset row restores it.

format?(value: number) => string

Formats the shown value, such as a fraction as a percentage; replaces unit when given.

labelstring

The row's title, shown left of the current value.

maximumnumber

The highest value the slider reaches.

minimumnumber

The lowest value the slider reaches.

onChange(value: number) => void

Called with the snapped value when a drag ends, not during the drag.

step?number

The increment values snap to; 1 when omitted.

subLabel?string

Text shown above the slider; none when omitted.

unit?string

Text appended to the shown value, such as px or %; none when omitted.

valuenumber

The saved value; the slider follows it whenever it changes.