Icon picker

A control for choosing one Lucide icon. The value is the icon’s kebab-case name, such as map or a-arrow-down. The trigger and search field match Input: no border, a wash unless inline, and a lightness shift on hover and focus. A highlighted icon shows the accent dot. The trigger value is Regular and secondary text is Light.

map

Anatomy

<UiIconPickerRoot v-model:value="icon">
  <UiIconPickerTrigger>
    <UiIconPickerValue />
  </UiIconPickerTrigger>
  <UiIconPickerPortal>
    <UiIconPickerPositioner>
      <UiIconPickerPopup>
        <UiIconPickerInput />
        <UiIconPickerClear />
        <UiIconPickerGrid />
        <UiIconPickerEmpty />
      </UiIconPickerPopup>
    </UiIconPickerPositioner>
  </UiIconPickerPortal>
</UiIconPickerRoot>

UiIconPickerGlyph draws a name on its own, outside the picker.

Parts

  • Root — owns value / open and the Lucide catalog. value is a kebab-case name or null.
  • Trigger — opens the popup. Arrow Down, Enter, and Space open it. The default slot is the current icon, or a dashed mark when empty.
  • Value — the current icon, or the word Icon when nothing is selected.
  • Glyph — the SVG for a name. Safe to use without the rest of the picker.
  • Portal / Positioner / Popup — a dialog anchored to the trigger. Esc and an outside click close it. No drop-shadow.
  • Input — filters names. Arrow keys move through the grid. Enter selects.
  • Clear — sets the value to null. Hidden when nothing is selected.
  • Grid / Item — the matching icons. The grid only paints the rows in view.
  • Empty — shown when the filter matches nothing.

Aliases are included in search, and the grid shows the current name.

API reference

Root

Groups the parts. Renders a <div>.

PropTypeDefaultDescription
defaultValuestring | nullnullUncontrolled icon name.
valuestring | null—Controlled icon name (v-model:value).
defaultOpenbooleanfalseUncontrolled popup.
openboolean—Controlled popup (v-model:open).
disabledbooleanfalseIgnore interaction. Sets data-disabled.
EventTypeDescription
@update:value(value: string | null) => voidThe chosen name changed.
@update:open(open: boolean) => voidThe popup opened or closed.

Trigger

Button that opens the popup. Renders a <button>.

AttributeDescription
data-popup-openPresent when the popup is open.
data-placeholderPresent when nothing is selected.

Input

Filter field. Renders an <input>.

PropTypeDefaultDescription
placeholderstringSearch iconsPlaceholder text.

Glyph

Draws one icon. Renders a <span> containing the SVG. Pass name, or leave it empty inside Root to draw the current value.

PropTypeDefaultDescription
namestring | nullcurrent valueLucide name to draw.

Positioner

Pins the popup to the trigger. Flips above the trigger when there is no room below.

PropTypeDefaultDescription
sideOffsetnumber4Gap between the trigger and the popup.