Skip to Content
Liquid Glass UI
Components

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:

  • DynamicIcon renders 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.
  • IconPicker is a form control. The trigger is identical to SelectTrigger (glass capsule, Bordered or Over-Glass) with a clear button. Its panel has a search field (300 ms debounce), an icon set Select (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.

Requests are cached per page and shared between pickers; a failed request shows Retry.

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

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/icon-picker

Adds @iconify/react together with popover, select, input-group, empty, skeleton and spinner.

DynamicIcon

apple-liquid-ui/preview/dynamic-icon
MacBook · 16:10

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.

PropTypeDefaultDescription
value / defaultValue / onValueChangestring''Full Iconify name; '' when cleared
defaultPrefixstring'lucide'Icon set listed while the search field is empty
titleReactNode'Icon'Mobile Drawer header
placeholderstring'Choose an icon'Trigger text while empty
size'default' | 'sm''default'Same steps as SelectTrigger
glassbooleantrueGlass trigger and popover; glass={false} is 100% opaque
namestring—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.

PropTypeDescription
localeLiquidGlassLocaleInputUI language of this component (any BCP 47 tag; unsupported ones fall back to English)
messagesPartial<IconPickerMessages>Text overrides, merged over the built-in text and the global messages.iconPicker
KeyBuilt-in text (English)
placeholderChoose an icon
labelIcon
searchPlaceholderSearch icons
collectionIcon set
allCollectionsAll sets
searchTitleSearch Iconify
searchDescriptionType a keyword to search 200k+ open-source icons.
loadFailedTitleCouldn’t load icons
loadFailedDescriptionThe Iconify API is unreachable. Check your connection and try again.
retryRetry
emptyTitleNo matching icons
emptyDescriptionTry another keyword or search all sets.
clearClear

On this page