Calm motion: animations on this site only fade, with no movement
Icon picker
A grid of your icons, with a search and arrow keys
Lets a person choose an icon, for example for a show, a category, or a menu item. The library has no icon set. You give the icons. For an emoji, use the emoji picker.
Basic
Chosen: microphone
iconsis a list of icons. Each icon has aname, thepathdata of its shape (or a list of paths), and optionalkeywords. The component draws the paths itself, so no SVG text goes into the page as raw HTML.view-boxis the box of the path data (default0 0 24 24).strokedraws the paths as lines, for line icons.v-modelis the name of the chosen icon. The chosen icon is a filled box.- The search matches the names and the keywords. A status line says how many icons match.
- The grid is a group of native radio buttons, so the arrow keys move between icons. Each icon has its name for screen readers and as a tooltip.
- Change the words with
labelsor a label pack:search,group,none, andcount(a function of the number).
Usage
ts
import { BlessIconPicker } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
icons* | BlessPickIcon[] | — | |
viewBox | string | "0 0 24 24" | the box of the path data |
stroke | boolean | — | draw the paths as lines, not filled shapes |
labels | Partial<{ search: string; group: string; none: string; count: (n: number) => string; }> | — | |
modelValue | string | — | the name of the chosen icon |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | undefined] |