Select
Responsive Apple Liquid Glass selector presenting a floating macOS 27 Liquid Glass dropdown on desktop, and automatically switching to a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer list on mobile.
Standard shadcn/ui JSX API (<Select> / <SelectTrigger> / <SelectValue> / <SelectContent> / <SelectGroup> / <SelectItem>) that adapts automatically via useIsMobile() (768px):
- Desktop (
>= 768px· macOS 27): Powered by@base-ui/react/select, opening a floating Liquid Glass menu with#0069F9hover highlights, trailing checkmarks, and keyboard navigation. - Mobile (
< 768px· iOS 27): Automatically switches to a floating bottom Liquid GlassDrawer(@base-ui/react/drawer) with swipe-to-dismiss, top grabber handle,50px+Inset Grouped rows, and trailing Apple Blue checkmarks.
Responsive Live Preview
Displays the macOS 27 dropdown by default; click the Mobile icon top-right to experience the iOS 27 bottom Drawer, or toggle Code to inspect the full snippet:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace (includes drawer, use-mobile, and liquid-glass)
npx shadcn@latest add @apple-liquid/select
# Or install directly via URL
npx shadcn@latest add https://your-domain.com/r/select.jsonTrigger Styles & Sizes
Triggers default to Liquid Glass (Regular - Small capsule matching Button); pass glass={false} for opaque Bordered triggers, or nest inside Dialog/Popover/glass Card for automatic Over-Glass flat fills. Supports default, sm, and disabled states:
Groups & Separators
Renders compact section headers and hairline dividers on desktop, and automatically transforms into iOS 27 Inset Grouped cards on mobile:
Controlled State
Fully supports controlled value / onValueChange and native form submission via name / required (automatically syncs a hidden <input> in mobile Drawer mode):
Usage
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
export function Example() {
return (
<Select defaultValue="macbook">
<SelectTrigger className="w-56">
<SelectValue placeholder="Choose a device..." />
</SelectTrigger>
<SelectContent title="Select Apple Device">
<SelectGroup>
<SelectLabel>Desktop & Mobile</SelectLabel>
<SelectItem value="macbook">MacBook Pro</SelectItem>
<SelectItem value="iphone">iPhone 18 Pro</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
);
}Props API
SelectTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass control material; false renders 100% opaque Bordered equivalent; auto-switches to Over-Glass on glass surfaces |
surface | 'default' | 'over-glass' | Auto-detected | Override surface context |
size | 'default' | 'sm' | 'default' | Desktop 32px / 28px, automatically switches to 46px / 38px on mobile |
disableMotion | boolean | false | Disable trigger press spring animation |
SelectContent
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface |
title | React.ReactNode | 'Select' | Header title shown in the mobile bottom Drawer |
side / align / sideOffset | Base UI Positioner | 'bottom' / 'start' / 6 | Desktop dropdown positioning only |
Language & Text
Select accepts locale and messages, which apply to all of its parts and the overlays it opens and win over the global <LiquidGlassProvider locale messages>. To override the text globally, put it under messages.select on the provider. See Liquid Glass → Global settings.
| Prop | Type | Description |
|---|---|---|
locale | LiquidGlassLocaleInput | UI language of this component (any BCP 47 tag; unsupported ones fall back to English) |
messages | Partial<SelectMessages> | Text overrides, merged over the built-in text and the global messages.select |
| Key | Built-in text (English) |
|---|---|
title | Select |
ScrollArea
macOS 27 / iOS 27 overlay scrollbars that stay hidden at rest, fade in on scroll or hover, thicken on pointer hover, and never consume content width.
Separator
Apple 27 system separator color (rgba(0,0,0,.1) light / rgba(255,255,255,.12) dark) tuned for crisp, restrained division across standard and Liquid Glass surfaces.