io.input.slider
Requests a numeric value within a range with a slider UI.
info
Added in v1.5.0.
Usage
- TypeScript
- JavaScript
- Python
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,
});
amount = await io.input.slider("Amount",
help_text="Select a number between one and ten.",
min=1,
max=10,
default_value=5
)
interval.com
Props
- TypeScript
- JavaScript
- Python
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
default_value
Optional
float | int
Default value for the input.
disabled
Optional
bool
Whether the input is disabled, preventing edits to the default value.
help_text
Optional
str
Secondary label for providing additional context.
max
Required
float | int
Maximum allowed value.
min
Required
float | int
Minimum allowed value.
step
Optional
float | int
Step size for the slider.
Returns
float | int
Did this section clearly explain what you wanted to learn?