Slider.

A slider picks a value within a range, or a range, by moving a thumb along its track. It’s the browser’s control: it’s submitted with its form, with or without JavaScript.

Available Updated December 3, 2026

Availability

  • Astro In use Gota, Onda and Cauce
  • React Ready The portal and Ops
  • Liquid Ready Shopify themes
  • Figma Soon Cuenca kit for Figma
cuenca.flouvia.com

When to use it

When the value lives on a scale and its step is the precision you need.

If you needUseNever
A value within a range, in steps SliderA number field next to it.
A range: a collection’s price Two-value slider, each with its form nameTwo number fields.
An exact value the step doesn’t give A number field, on its ownA slider.
Turning something on or off SwitchA two-step slider.
Price
One value and a range, live: grab a thumb or touch the track and the bubble shows the value. With the keyboard, the arrow keys, Page Up and Page Down.
Do: The slider with the step it needs: from 0 to 50%, in steps of 5.
Don’t: A number field next to the slider: two controls for one value. If you need an exact value, the field goes on its own.

Anatomy

PartWhat it is
The label Its name, always: “Support hours per month”.
The value With showValue, the resting value on the label’s line, in secondary text.
The track The dimmed line, filled with the accent up to the thumb.
The thumb What you grab and move: the switch’s.
The marks A dot per step, with twelve steps or fewer; the one reached lights up.
The names Under the track: the marks’ names or the ends.
The bubble The value above the thumb while it moves.
The icons One at each end, instead of the names: minus and plus.

Sizes

PieceWith a mouseBy hand
The track 4 thick; a 44 high targetThe same
The thumb 20; 1.12 when grabbed28
The marks 44
The bubble 12 above the thumb, in footnote at 500, with tabular figures44 above the center, clear of the fingertip
The label In subheadline, at 500; the value and the names in secondary textThe same

Marks and step

The step is the precision on offer. Marks show where each step falls.

  • The value snaps to the step

    A value that arrives between two steps is written as the nearest one: 63 with a step of 5 is 65.

  • Marks with twelve steps or fewer

    A dot per step, lit as you reach it. With more steps, the track is plain.

  • A name says more than a figure

    A mark with a name shows it below and in the bubble: “Medium”, not “2”.

Five named steps. The mark you reach lights up with its name and, on the site, a drop sounds as you cross it.

The bubble

The value while it moves, where your eyes are. The short one in view; the long one, for screen readers.

  • When it appears

    When you grab the thumb or touch the track, and it leaves when you let go. With the keyboard, it stays while focus is visible.

  • Escape hides it

    Until the next key. Inside a sheet or a popover, the first Escape only hides the bubble.

  • It never leaves the track

    At the ends it shifts inward. By hand, it rises 44 from the center so the fingertip doesn’t cover it.

  • The resting value steps aside

    With showValue, the label’s value leaves while the bubble is in view: it’s said once.

Two values

A range with two thumbs on the same track. Each one is a browser control with its form name.

  • They stop at each other

    The moving thumb stops at the other one and stays on top; the Tab order doesn’t change.

  • The track moves the nearest

    Touching the track brings the nearest thumb there, and you can keep dragging.

  • One bubble at a time

    Only the moving thumb’s bubble shows.

  • They submit on their own

    Both thumbs are submitted with their form, with or without JavaScript: a store’s price filter works the same.

States

StateHow it looks
At rest Filled up to the thumb; the value, if shown, on the label’s line.
Grabbed The thumb grows to 1.12 and the bubble comes out.
Focus The 2 px ring around the thumb, with the layer’s color between them.
Disabled Dimmed; it can’t be grabbed or take focus.
Forced colors The track in CanvasText, the fill in Highlight, the thumb in ButtonText and the disabled slider in GrayText.

Content

PartHow it’s writtenExample
The label What’s chosen, with its unit if it has one.“Support hours per month”
The bubble Short: the figure with its unit.“12 h”
What screen readers hear Long, as you’d say it.“12 hours per month”
The marks A name when it says more than the figure.“Small”, “Medium”, “Large”
The two thumbs Their names come from the label. In Spanish, a feminine label needs them written out: «Distancia mínima».“Minimum price” and “Maximum price”

Languages and direction

  • Its text, in both languages

    “Minimum price”, “Maximum price” and “$500 to $3,000” come with lang: «Precio mínimo», «Precio máximo» and «$500 a $3,000».

  • Figures, from the language

    With a named format (number, currency or percent), the separator and the sign are the page language’s: “12%” and «12 %».

  • Right to left

    The track and the arrow keys reverse. Each name centers on its mark and the ends stay at the track’s edges.

Accessibility

Each thumb is the browser’s control, with its name and its value said in words. It meets WCAG 2.2 AA.

KeyWhat it does
← → ↑ ↓ One step; the bubble appears
Page Up · Page Down A tenth of the range, snapped to the step
Home · End The minimum and the maximum; with two thumbs, up to the other
Escape Hides the bubble until the next key
  • The value, in words

    Screen readers hear “12 hours per month” on arrival and with every step. Without JavaScript, they hear the figure.

  • Dragging has another way

    Touching the track brings the thumb there; the keyboard does the rest.

  • What appears can be dismissed

    The bubble hides with Escape, doesn’t cover the thumb and stays while focus is there.

  • Not just color

    The mark you reach lights up with its name, and the mark’s sound always comes with something you see.

  • Measured contrast

    The label, 16.61:1; the value and the names, 7.35:1; the fill against the layer, 4.33:1; a mark on the track, 5.29:1; the bubble, 12.80:1.

Motion and sound

PieceWhat it doesSpringWith reduced motion
The thumb Grows to 1.12 when grabbeddropDoesn’t grow
The bubble Comes in as it moves and leaves on releasedrop · ebbFades in 200 ms
The track Gives like rubber if the hand goes past the end, and returns on releasedropDoesn’t give
The resting value Steps aside while the bubble is in view and returnsdrop · ebbFades
  • One drop per mark

    On the site, crossing a mark sounds hover: one per mark, never one per step, 40 ms apart.

  • Quiet where people work

    In the portal and Ops, the slider doesn’t sound. sound="none" silences it anywhere.

Changes

  • Number field · Cuenca

    New guide: when to use it instead of a text field, the currency and its picker, formatting as you type and how its units, decimals and range are written, with live pieces. Text fields asks for it for an amount, and its suffix stays next to its value when read-only; Slider, for an exact value.

  • Tabs, accordion, pagination and slider · Cuenca

    New guides: tabs and tab navigation, the accordion, pagination and the slider, when to use each and how they’re written, with live pieces.

Figma is a trademark of its owner; its logo appears only to show compatibility and does not imply endorsement.