Icon Picker
Pick any of 200k+ Iconify icons — search by keyword or browse a set — from a Select-style trigger that opens a Liquid Glass popover on desktop and an iOS 27 bottom Drawer on mobile. DynamicIcon renders any icon by name.
Two exports in one file:
DynamicIconrenders any Iconify icon by name ("mdi:home", or a bare Lucide name like"BookOpen"/"book-open"). Icon data is fetched from the Iconify API on first use and cached, so names stored in a database render without bundling whole icon sets. While loading, a same-size pulsing placeholder keeps the layout still.IconPickeris a form control. The trigger is identical toSelectTrigger(glass capsule, Bordered or Over-Glass) with a clear button. Its panel has a search field (300 ms debounce), an icon setSelect(all 200+ sets, grouped by category) and a virtualized grid — only the visible rows are rendered, so a set of 7,000 icons scrolls smoothly.- Desktop (
>= 768px· macOS 27): a Liquid Glass popover, 8 columns of 32px cells. - Mobile (
< 768px· iOS 27): the standard bottom Drawer, 7 columns of 44pt cells; the search field is not auto-focused so the keyboard doesn't cover the sheet.
- Desktop (
Requests are cached per page and shared between pickers; a failed request shows Retry.
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/icon-pickerAdds @iconify/react together with popover, select, input-group, empty, skeleton and spinner.
DynamicIcon
Usage
import { DynamicIcon, IconPicker } from '@/components/ui/icon-picker';
export function Example() {
const [icon, setIcon] = React.useState('lucide:sparkles');
return (
<>
<IconPicker name="icon" title="Menu icon" value={icon} onValueChange={setIcon} />
<DynamicIcon name={icon} className="size-5" />
</>
);
}Props API
IconPicker
Other props (id, aria-*, onBlur, disabled…) land on the trigger, so it drops into a Field.
| Prop | Type | Default | Description |
|---|---|---|---|
value / defaultValue / onValueChange | string | '' | Full Iconify name; '' when cleared |
defaultPrefix | string | 'lucide' | Icon set listed while the search field is empty |
title | ReactNode | 'Icon' | Mobile Drawer header |
placeholder | string | 'Choose an icon' | Trigger text while empty |
size | 'default' | 'sm' | 'default' | Same steps as SelectTrigger |
glass | boolean | true | Glass trigger and popover; glass={false} is 100% opaque |
name | string | — | Submits the value through a hidden input |
DynamicIcon
Accepts every @iconify/react Icon prop except icon, plus name (full Iconify id, or a bare Lucide name).
Language & Text
IconPicker, IconPickerPanel accept 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.iconPicker 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<IconPickerMessages> | Text overrides, merged over the built-in text and the global messages.iconPicker |
| Key | Built-in text (English) |
|---|---|
placeholder | Choose an icon |
label | Icon |
searchPlaceholder | Search icons |
collection | Icon set |
allCollections | All sets |
searchTitle | Search Iconify |
searchDescription | Type a keyword to search 200k+ open-source icons. |
loadFailedTitle | Couldn’t load icons |
loadFailedDescription | The Iconify API is unreachable. Check your connection and try again. |
retry | Retry |
emptyTitle | No matching icons |
emptyDescription | Try another keyword or search all sets. |
clear | Clear |
HoverCard
macOS 27 22px-radius Liquid Glass hover preview card for user profiles, link summaries, and quick design-spec previews with automatic touch-input adaptation.
Input
Responsive Apple Liquid Glass single-line text input aligned with macOS 27 and iOS 27 Text Fields guidelines, featuring a 3.5px Apple Blue focus ring, anti-zoom Safari font sizing, and glass/over-glass surface adaptation.