Skip to content
Strife Docs

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

TypeScript
fields.slider({
  label: 'Opacity',
  min: 0,
  max: 1,
  step: 0.05,
})

Options

OptionTypeRequiredDefaultDescription
label
string
Yes
—
Label shown to editors in Strife Studio.
description
string
No
—
Not shown in Studio's editor panel.
searchable
boolean
No
—
Stored on the template; nothing uses it today.
filterable
boolean
No
—
Stored on the template; nothing uses it today.
protected
boolean
No
—
Stops the field from being edited or removed in Studio's template designer. No effect in the editor panel.
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
Ignored by Studio's editor panel: the slider can still be moved.
tooltip
boolean
No
true
Ignored by Studio's editor panel.

No localizable option.

Output type

number.

See also

  • Slider — the same editor, documented from the Strife Studio UI side.