Reference Field Reference
fields.slider()
Numeric range slider. Never localizable.
Numeric range slider. Maps to editor { name: 'str-slider', type: 'slider' }. Output is a plain number; range bounds, step and affordances are configured via the options below.
Example
fields.slider({
label: 'Opacity',
min: 0,
max: 1,
step: 0.05,
})Options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
label | string | Yes | — | Label shown to editors in Strife Studio. |
description | string | No | — | Tooltip shown to editors. |
searchable | boolean | No | — | Include in the team's search index. |
filterable | boolean | No | — | Allow filtering content lists by this value. |
protected | boolean | No | — | Restrict editing to users with the appropriate permission. |
propertyName | string | No | — | Override the stored property name. |
min | number | null | No | 0 | Lower bound of the range. |
max | number | null | No | 100 | Upper bound of the range. |
step | number | null | No | 1 | Increment step when dragging. |
readonly | boolean | No | false | Disables interaction. |
tooltip | boolean | No | true | Shows a percentage tooltip on hover. |
No localizable option.
Output type
number.
See also
- Slider — the same editor, documented from the Strife Studio UI side.