T
SliderRowProps
Props for SliderRow.
type SliderRowProps = { … }Members
defaultValue
numberThe default, which Discord's slider marks on its track; the section's reset row restores it.
format?
(value: number) => stringFormats the shown value, such as a fraction as a percentage; replaces unit when given.
label
stringThe row's title, shown left of the current value.
maximum
numberThe highest value the slider reaches.
minimum
numberThe lowest value the slider reaches.
onChange
(value: number) => voidCalled with the snapped value when a drag ends, not during the drag.
step?
numberThe increment values snap to; 1 when omitted.
subLabel?
stringText shown above the slider; none when omitted.
unit?
stringText appended to the shown value, such as px or %; none when omitted.
value
numberThe saved value; the slider follows it whenever it changes.