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:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace
npx shadcn@latest add @apple-liquid/slidermacOS Ticks
Pass ticks (boolean or custom tick count) for evenly spaced macOS System Settings tick marks beneath the track:
Dual-Thumb Range
Pass a two-number array for range selection, giving each thumb its own independent refractive droplet:
Control Center Glass Track
Pair the default glass track with size="lg" for Apple Control Center-style brightness and volume sliders:
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:
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Translucent 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 |
ticks | boolean | number | false | Display macOS-style evenly spaced tick marks (or specify exact count) |
refraction | number | 1 | Snell refraction multiplier for the dragged droplet lip |
dispersion | number | 0.055 | Subtle RGB chromatic dispersion at droplet edges (0 disables) |
disableMotion | boolean | false | Disable liquid lens refraction and spring physics (respects prefers-reduced-motion) |
Skeleton
Apple 27-styled content placeholder inspired by SwiftUI redacted, featuring soft system fills and a gentle pulse animation tuned for standard, Liquid Glass, and Over-Glass surfaces.
Spinner
Apple 27 Indeterminate Spinner with eight rounded spokes rotating in stepped cadence, sized 20px on mobile ↔ 16px on desktop, inheriting current text color for seamless embedding in buttons.