Skip to Content
Liquid Glass UI
Components

Slider

Liquid Glass horizontal capsule slider inspired by Apple iOS 27 and macOS 27, expanding into a transparent refractive droplet while dragging with tick marks, dual-thumb ranges, and Control Center glass tracks.

Built on @base-ui/react/slider, LiquidLens, and motion/react to faithfully capture Apple macOS 27 and iOS 27 Liquid Glass slider proportions and drag refraction:

  • Refractive droplet thumb: Pressing or dragging the capsule thumb expands it into a transparent optical lens (LiquidLens) that magnifies and bends the underlying blue track and tick marks before springing back smoothly on release.
  • Native ticks & range: Supports single values, dual-thumb ranges, and macOS System Settings-style evenly spaced tick marks (ticks).
  • Viewport responsive: Automatically adapts track thickness and thumb dimensions between < 768px (iOS 27) and >= 768px (macOS 27).

Liquid Glass Refractive Slider

Press and drag the horizontal capsule thumb left or right to watch the liquid droplet refract the blue fill bar with subtle edge dispersion:

apple-liquid-ui/preview/slider-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

# Install via the configured @apple-liquid namespace
npx shadcn@latest add @apple-liquid/slider

macOS Ticks

Pass ticks (boolean or custom tick count) for evenly spaced macOS System Settings tick marks beneath the track:

apple-liquid-ui/preview/slider-ticks
MacBook · 16:10

Dual-Thumb Range

Pass a two-number array for range selection, giving each thumb its own independent refractive droplet:

apple-liquid-ui/preview/slider-range
MacBook · 16:10

Control Center Glass Track

Pair the default glass track with size="lg" for Apple Control Center-style brightness and volume sliders:

apple-liquid-ui/preview/slider-control-center
MacBook · 16:10

Usage

import { Slider } from '@/components/ui/slider';

export function Example() {
  return <Slider defaultValue={60} min={0} max={100} />;
}

Props API

Slider

Supports all standard @base-ui/react/slider Slider.Root props (value, defaultValue, onValueChange, min, max, step, orientation, disabled, etc.) plus:

PropTypeDefaultDescription
glassbooleantrueTranslucent Liquid Glass track and refractive droplet thumb while dragging; false renders 100% opaque gray track and solid white thumb
size'sm' | 'default' | 'lg''default'Responsive size scale calibrated for mobile and desktop
ticksboolean | numberfalseDisplay macOS-style evenly spaced tick marks (or specify exact count)
refractionnumber1Snell refraction multiplier for the dragged droplet lip
dispersionnumber0.055Subtle RGB chromatic dispersion at droplet edges (0 disables)
disableMotionbooleanfalseDisable liquid lens refraction and spring physics (respects prefers-reduced-motion)

On this page