io.input.slider
Requests a numeric value within a range with a slider UI.
info
Added in v1.5.0.
Usage
- TypeScript
- JavaScript
const amount = await io.input.slider("Amount", {
helpText: "Select a number between one and ten.",
min: 1,
max: 10,
defaultValue: 5,
});
const amount = await io.input.slider("Amount", {
helpText: "Select a number between one and ten.",
min: 1,
max: 10,
defaultValue: 5,
});
interval.com
Props
- TypeScript
- JavaScript
defaultValue
Optional
number
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Optional label providing additional context. Supports inline markdown elements like bold, italics, and links.
max
Required
number
Maximum allowed value.
min
Required
number
Minimum allowed value.
step
Optional
number
Step size for the slider.
Returns
number
defaultValue
Optional
number
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Optional label providing additional context. Supports inline markdown elements like bold, italics, and links.
max
Required
number
Maximum allowed value.
min
Required
number
Minimum allowed value.
step
Optional
number
Step size for the slider.
Returns
number
Was this section useful?