Components · FormNot verified with Figma

Icon picker

An icon picker is a text field that holds a Material Symbols name. A panel opens on top of it with instant search over all icons, Recent and Popular.

Tokens, dimensions, states and requirements. There is no Figma component: values come from the live token package and the specification skill.

Design Tokens

Resolved from the live token package.

StatePartTokenValue

Open points: no Figma component. The dimensions were decided in code. Colors, shadow and spacing in the picker are tokens only.


Sizes

PartValue
PanelTop of the field, same width, 12px padding
Search box42px high
Icon cell40px
Grid height176px (it scrolls)
ResultsUp to 60

The same on every breakpoint.


Measurements

Dimensions

Padding of the open panel. The shaded area is the 12px padding; the lines show its value. The panel is a static copy here.

The panel at true size (1:1). The numbers are read from the component.
AttributeValue
Panel padding12px on every side
Gap between the parts12px
Search box42px high, full width, 1px border
Icon cell40px high; the grid fits as many 40px columns as the width allows
Gap between cells4px
GridUp to 176px high, then it scrolls
Panel positionTop and sides 12px outside the field (top: -12px; left: -12px; right: -12px)
CornersSquare

Spacing

The same padding and gaps as spacing tokens.

PartValue
Panel padding and gap between the partsspace-12
Gap between icon cellsspace-4
Search box paddingspace-8 above and below, space-12 left and right

States

The field is an Input and has the Input states. The panel and its icons have the states below. Hover and focus come from the browser and are described here.

StatePartLook

Typography

PartSize / line heightLetter spacingWeight
Search text16/24inheritedRegular
Group label12/180.24px600
Icon24px Material Symbols, Outlined, Fill 0, Weight 300, Grade 0——
No match message14/20inheritedRegular

The sizes are set in the script’s CSS in pixels. Open point: bind them to type tokens if the picker moves into a design token pass.


Structure

Elements

ElementClassNotes
Anchorip-wrapAdded to the .input-wrap of the field, or to a wrapper made around a bare input.
Panelip-panelHidden until the field opens. ip-mouse when opened with the mouse.
Search boxip-searchA text input with aria-label="Search icons".
Group labelip-labelRecent, Popular or Results.
Grid and cellip-grid, ip-btnaria-pressed on the picked icon.
No matchip-emptyThe message under Results.

Types

There is one type.

Width

The panel has the width of the field.

Data and loading

TopicDetail
Scriptcomponents/icon-picker/icon-picker.js. It loads icon-picker-data.js (all names and search tags, sorted by popularity) from its own folder 0.5 s after page load. Never add the data file by hand.
Data size1.4 MB, a copy of the Google Fonts Material Symbols metadata (August 2026). Fine for a prototype; serve a smaller list or search on the server in production.
RefreshDownload https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true and rewrite the file as window.ECO_ICONS=[[name,"tags"],…] sorted by popularity.
FontThe page needs the Material Symbols Outlined font (in both page templates).

Motion

None. The panel opens and closes at once, with no transition and no animation.


Behavior

MomentWhat happens
Click or Tab into the fieldA panel opens on top of the field (same width, 12px padding). The search box comes first and has focus.
Search box emptyRecent (the last 8 picks, kept in localStorage and shared by all pages) and Popular (the top 60).
TypingInstant search over all icons. Ranked: name starts with, then a name word starts with, then a tag word starts with; each group by popularity. Up to 60 shown; the header says Results (n). No match: “No icons match …”.
Click an iconThe name goes into the field, an input event fires, the panel closes and focus returns to the field.
Esc, click outsideCloses without changing the value.
Focus ring on the search boxHidden when the panel was opened with the mouse, shown when opened with Tab.

Accessibility Requirements

TopicRequirement
FieldA visible label with for and id, as for every Input.
Search boxaria-label="Search icons".
IconsReal button elements named by the icon name (aria-label and title), with aria-pressed on the picked one. The glyph is aria-hidden="true".
Focus2px ring border-focus on the search box and the icons on keyboard focus (WCAG 2.4.7, 1.4.11).
DismissalEsc closes the panel and keeps the value.
Open pointThe panel is not announced as a dialog or a combobox listbox. Open point: add the roles if the picker is used outside back-office forms.