Acrylic
Components

Slider

macOS 26 slider — a capsule rail with an accent range and a frosted-white pill knob, in standard & center-biased variants, with optional tick marks.

The macOS 26 slider, aligned onto the Radix Slider primitive: a capsule translucent rail, an accent-blue filled range, and a soft frosted-white pill knob. Geometry (track height, knob pill, capsule radii) is lifted from the Apple macOS 26 UI Kit "Sliders and Dials" page; colors flip light/dark via the Acrylic theme tokens. The kit's two orthogonal axes are exposed as props — variant (fill origin) and marks (the Ticked add-on) — and compose with five sizes, single/range values, and both orientations.

Installation

npx shadcn add https://acrylic-ui.vercel.app/r/slider.json

Usage

import { Slider } from "@/components/acrylic/slider"

<Slider defaultValue={[60]} max={100} step={1} />

Variants

The kit's Sliders family is two orthogonal axes: fill origin (standard vs center) × ticked (the marks add-on). All four combinations:

variantkit namefilluse for
standardStandardfrom the start edge to the thumbone-directional values (volume, opacity)
centerCenter-biasedfrom the track midpoint to the thumbbipolar values (balance/pan, EQ, −100…+100)
<Slider variant="center" min={-100} max={100} defaultValue={[0]} />   {/* center-biased */}
<Slider marks defaultValue={[50]} step={12.5} />                       {/* ticked */}
<Slider marks={[0, 25, 50, 75, 100]} defaultValue={[50]} />            {/* explicit marks */}

Sizes

Five control sizes (kit 1 Mn … 5 XL). The track is 4px for mini/small and 6px for medium/large/xl; the pill knob grows 16×12 → 24×20.

mini · small · medium (default) · large · xl.

Examples

Volume, a bipolar balance (center-biased), a ticked brightness scale, a two-thumb price range, plus vertical and disabled — each with a live readout.

Volume65%
BalanceCenter
Brightness60
Price range$30 – $70
Vertical
Vertical + ticks

Notes

  • Track (rail): capsule, 6px tall (kit medium/large/xl; mini/small are 4px), filled with --acr-chip — the kit's translucent black/white rail (≈6% in the kit), so it flips light/dark for free.
  • Range (filled): capsule, bg-primary — the kit's #0088FF accent (dark #0091FF) maps exactly onto --primary. For variant="center" the range fills from the track midpoint toward the thumb instead of from the start edge.
  • Thumb (knob): frosted-white pill (--acr-control) with a hairline border (--acr-control-border) and a soft ambient shadow, mirroring the kit's rounded pill knob (16×12 / 18×14 / 20×16 / 24×20, radius = height/2; the long axis runs perpendicular to the track, so it swaps on vertical sliders). Focus shows an accent ring (ring-ring/25); disabled dims to 50%.
  • Marks (Ticked): the kit's "linear slider with ticks" add-on — small 2×2 capsule dots at foreground/25 laid under the track. marks accepts true (derive positions from step, capped at 40, else 9 even dots) or an explicit array of values.
  • Over-glass: the kit also ships an "Over-glass" material set for sliders placed on a glass surface — its tokens are identical to the standard set, so it is not a separate variant here.
  • Props: defaultValue, value, min (0), max (100), step (1), onValueChange, variant (standard | center), marks (boolean | number[]), size (mini · small · medium · large · xl), orientation (horizontal | vertical), and disabled. Pass an array with two entries to get a range slider.
<Slider defaultValue={[25, 75]} max={100} step={1} />        {/* range */}
<Slider variant="center" min={-100} max={100} marks step={25} />  {/* center + ticks */}
<Slider defaultValue={[40]} orientation="vertical" />        {/* vertical */}

On this page