Guide / Controls / Inputs

Slider

Slide to pick a number

When to use it. A numeric range input. Stores a .number value.

Type
slider
Default size
1 row × 2 columns
Symbol
slider.horizontal.3
Docs
Docs complete
Search for it as
  • range
  • dial
  • volume
  • brightness
  • scrub
  • level
Slider: Send a seek command only on release
Rendered by the app

Fields

18 fields you can set on a slider control. Every control also takes the shared fields (id, position, span, sync, action).

Fields
FieldTypeDefaultWhat it does
Motionanimationchoiceone of 5—

How the handle glides when the value changes

Sets how the handle and fill travel when the value changes, from instant jump to a soft glide.

  • smoothan even, natural glide
  • snappya quick, firm move
  • bouncyovershoots slightly, then settles
  • gentlea slow, soft drift
  • instantjumps with no travel
Lowest valueminnumber0

Where the slider starts

Sets the value at the left end (or arc start) of the slider, in the slider's own units.

Highest valuemaxnumber100

Where the slider ends

Sets the value at the right end (or arc end) of the slider, in the slider's own units.

Step sizestepnumber1

How coarsely the slider snaps

Makes the handle snap to values spaced this far apart from the lowest value; 0 or less slides smoothly.

Send while draggingcontinuouson / offtrue (on)

Whether the change is sent live or only when you let go

On, the new value is sent throughout the drag; off, it is sent once when you lift your finger.

Hide the numberhideValueon / offfalse (off)

Takes the number off the slider

Removes the number readout from the header and the radial center; the title and dragging still work.

Titlelabeltext—

The name shown above the slider

Writes this text in the header above the slider.

Starting valuedefaultValuenumber—

Where the handle rests until something else sets it

Places the handle at this value (within lowest to highest) when the layout first appears.

Colortintcolor#667eea

The color of the filled part

Colors the filled portion of the track or arc with this color.

Lookstylechoiceone of 3default

Which kind of slider it is

Switches between a bar with a big handle, a thin seek bar, or a circular arc.

  • default defaulta bar with a round handle and optional end symbols
  • scrubbera thin progress line with a small draggable dot
  • radiala circular arc you drag around
Number formatformatValuechoiceone of 4decimal

How the number is written

Changes how the readout is written, such as 72, 3:45 or 80%, or hides it.

  • decimal defaulta plain number like 72 or 3.5
  • timeminutes and seconds like 3:45, from a total in seconds
  • percenta whole percentage like 80%
  • noneno number shown
Symbol at low endminIcontext—

A small picture at the left end

Shows this SF Symbol at the left end of the bar (default look only).

Symbol at high endmaxIcontext—

A small picture at the right end

Shows this SF Symbol at the right end of the bar (default look only).

Hide the titlehideLabelon / offfalse (off)

Takes the name off the top

Removes the header row so only the slider itself shows.

No background cardhideBackgroundon / offfalse (off)

Lets the slider sit directly on the page

Removes the frosted card behind the slider so it floats on the page.

Arc lengtharcAnglenumber1–360step 1270

How much of a circle the arc covers

Sets how far the arc sweeps, from 1 to 360 degrees (270 leaves a gap at the bottom).

Arc turnarcRotationnumber-180–180step 10

Where the arc begins

Turns the whole arc around its center by -180 to 180 degrees.

Arc thicknessarcThicknessnumber1–40 ptstep 18

How thick the arc line is

Shows a pill naming the change with an Undo button for 3 seconds after you set a value.

Theme fields

Restyle one control by setting these in its theme object; a layout's theme sets them for every control.

Theme fields
FieldTypeDefaultWhat it does
Track colortheme.trackColorcolor#39393D

The color of the empty part of the bar

Colors the unfilled part of the track.

Track heighttheme.trackHeightnumber4–60 ptstep 131

How thick the bar is

Sets how tall the bar is, from 4 to 60 points.

Handle colortheme.thumbColorcolor#FFFFFF

The color of the grab handle

Fills the draggable handle with this color.

Handle roundnesstheme.thumbRadiusnumber0–30step 114

How round the handle is

Rounds the handle corners from 0 (square) to 30 points.

Handle sizetheme.thumbSizenumber12–50 ptstep 128

How big the grab handle is

Sets the handle diameter from 12 to 50 points.

Handle shadowtheme.thumbShadowon / offtrue (on)

How heavy the outline is

Colors the quieter text such as the value readout.

Track roundnesstheme.trackRadiusnumber0–20step 12

How round the bar ends are

Rounds the track corners from 0 to 20 points.

Emits and receives

What this control sends when you use it, and what it can show or follow when data arrives.

Emits

Emits
SendsWhenTypeWhat it sends
When you slide itvaluechangenumber

the number you slid to

With Send while dragging off, it sends once, when you let go

Example: 42

Receives

Receives
TakesFromTypeWhat it does
valuefollowhub, mqtt, http, store, defaultnumber

a number to move the handle to

the handle glides to it; your next slide replaces it

Example: 42

Sample

The placeholder value the editor shows before real data arrives.

  • 40 then 70

Examples

7 examples, each one a control you can paste into a layout.

Send a seek command only on release

Shows continuous: false: the thumb previews while you drag, and the value is sent once when you let go.

JSON 5 lines
{
  "type": "slider", "id": "seek", "position": [0, 0],
  "label": "Playback", "min": 0, "max": 300, "step": 1,
  "style": "scrubber", "formatValue": "time", "continuous": false
}

Open in CAR-TER

Slider: Send a seek command only on release
Rendered by the app

Basic brightness slider

Shows the default look with an action: dragging sets a room's brightness from 0 to 100, sending the number each step.

JSON 12 lines
{
  "type": "slider",
  "id": "lr-brightness",
  "position": [1, 0],
  "span": [1, 3],
  "min": 0,
  "max": 100,
  "step": 1,
  "defaultValue": 80,
  "label": "Brightness",
  "action": { "method": "meshsocket", "mode": "send", "event": "route_msg_noreply", "payload": { "target_name": "hue-bridge", "type": "brightness", "payload": { "room": "living", "level": "{{value}}" } } }
}

Open in CAR-TER

Slider: Basic brightness slider
Rendered by the app

Volume slider with icons

Shows end symbols and a percent readout: a speaker icon at each end, with no header title, and the value written as a percentage.

JSON 15 lines
{
  "type": "slider",
  "id": "volume",
  "position": [0, 0],
  "span": [1, 4],
  "min": 0,
  "max": 1,
  "step": 0.01,
  "defaultValue": 0.5,
  "hideLabel": true,
  "minIcon": "speaker.fill",
  "maxIcon": "speaker.wave.3.fill",
  "formatValue": "percent",
  "tint": "#667eea"
}

Open in CAR-TER

Slider: Volume slider with icons
Rendered by the app

Seek scrubber with sync

Shows the thin scrubber look with a time readout that follows live elapsed time from the network and sends a seek when you drag.

JSON 17 lines
{
  "type": "slider",
  "id": "seek-slider",
  "position": [0, 0],
  "span": [1, 4],
  "min": 0,
  "max": 300,
  "step": 1,
  "defaultValue": 0,
  "label": "Position",
  "style": "scrubber",
  "tint": "#FF2D55",
  "formatValue": "time",
  "hideBackground": true,
  "action": { "method": "meshsocket", "mode": "send", "event": "route_msg_noreply", "payload": { "target_name": "player", "type": "command", "payload": { "command": "seek", "position": "{{value}}" } } },
  "sync": [{ "method": "meshsocket", "type": "listen", "event": "broadcast", "filter": { "msg_type": "player_state" }, "valuePath": "elapsed" }]
}

Open in CAR-TER

Slider: Seek scrubber with sync
Rendered by the app

Radial dial

Shows the radial look: a 270-degree arc you drag around, with a thicker line, rotated so the gap sits at the bottom.

JSON 6 lines
{
  "type": "slider", "id": "thermostat", "position": [0, 0], "span": [2, 2],
  "label": "Target", "min": 10, "max": 30, "step": 0.5, "defaultValue": 21,
  "style": "radial", "arcAngle": 270, "arcRotation": 0, "arcThickness": 14,
  "tint": "#FF9500"
}

Open in CAR-TER

Slider: Radial dial
Rendered by the app

Quiet slider with undo

Shows hideValue and confirm: the number is hidden, and after each change a pill with Undo appears for 3 seconds.

JSON 5 lines
{
  "type": "slider", "id": "fan-speed", "position": [0, 0],
  "label": "Fan", "min": 0, "max": 5, "step": 1, "defaultValue": 2,
  "hideValue": true, "confirm": true, "animation": "snappy"
}

Open in CAR-TER

Slider: Quiet slider with undo
Rendered by the app

Themed slider

Shows theme overrides: a tall track, a large square-ish handle with no shadow, and a custom accent, for a bolder bar.

JSON 5 lines
{
  "type": "slider", "id": "bold-level", "position": [0, 0],
  "label": "Level", "min": 0, "max": 10, "step": 1, "formatValue": "decimal",
  "theme": { "trackHeight": 44, "thumbSize": 40, "thumbRadius": 8, "thumbShadow": false, "trackColor": "#2C2C2E", "thumbColor": "#FFFFFF", "cornerRadius": 20 }
}

Open in CAR-TER

Slider: Themed slider
Rendered by the app

Try it on your phone

carterkit serves a small hub on your computer and pushes one example to CAR-TER on your iPhone or iPad. Pair once with the code it prints.

  1. Install the Python kit.

    pip install carterkit
  2. Show “Send a seek command only on release” on your phone.

    carterkit demo slider --example 'Send a seek command only on release'
  3. Swap in any example name from this page, or leave --example off for the first one.

carterkit quickstart · Get CAR-TER

What it sends and shows

The io: facts above are the machine-readable version: a slider sends its number while you drag (continuous: false sends once, on release), and it can follow a number set from outside, so the handle moves when your hub changes the value. The editor previews it at 40.

Styles

"default"

System Slider with optional min/max icons.

"scrubber"

Custom thin progress bar with draggable dot. Used for seek bars, compact volume controls.

"radial"

Circular arc slider. The user drags around an arc to set the value. Configure the arc geometry with arcAngle, arcRotation, and arcThickness.

Format Values

Value Output Example
"decimal" "72" or "3.5" Respects step for decimal places
"time" "3:45" Minutes:seconds from total seconds
"percent" "80%" Integer percentage
"none" (hidden) No value display

Behavior

  • With continuous: true (default), all styles send actions as the dragged value changes, plus one final action on release. Repeated movement within the same detent does not send extra change actions.
  • With continuous: false, the thumb and local value preview throughout the drag, but only release sends an action. Cancellation or removal restores the starting value without sending an action, unless a newer remote value has replaced the preview. VoiceOver adjustments remain immediate.
  • hideValue: true hides header and radial readouts while retaining the label and spoken value.
  • Positive step snaps relative to min; step <= 0 is continuous. Values always stay within the range, and both endpoints are reachable even when the span is not a multiple of step.
  • Reversed bounds are sorted; equal bounds produce a fixed value. Incoming values outside the range are clamped for display without writing back during rendering.
  • All styles animate remote changes. Radial fill and thumb move together along the arc; dragging follows the finger immediately. Reduce Motion disables travel animation. Arc sweep clamps to 1–360° and thickness to 1–40 pt.
  • Drag cancellation and removal end the editing session, allowing the attribute editor to close its undo group.
  • Network-synced value updates animate smoothly unless the user is actively dragging
  • No default haptic (system provides its own slider feedback)

Generated from ControlDocs/slider.md. Something unclear or missing? Tell me.