Skip to main content
Big news! Interval has been acquired by Meter. Learn more →

io.input.slider

Requests a numeric value within a range with a slider UI.

info

Added in v1.5.0.

Usage

const amount = await io.input.slider("Amount", {
helpText: "Select a number between one and ten.",
min: 1,
max: 10,
defaultValue: 5,
});
interval.com

Props

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

Did this section clearly explain what you wanted to learn?
On this page