Icons by name
Render any icon by its kebab-case name with the Icon component.
Icon from @unflowio/ui renders any @unflowio/icons icon by name. It loads the icon's module on first use and caches it, and renders an empty box of the right size meanwhile so the layout does not shift.
Usage
import { Icon } from '@unflowio/ui/components/Icon';
<Icon name="sparkle" /> // 16 px, regular, currentColor, decorative
<Icon name="sparkle" size={20} weight="bold" />
<Icon name="google-logo" label="Google" /> // role="img" with an accessible name| Prop | Type | Default |
|---|---|---|
name | IconName | required |
size | number | string | 16 |
weight | 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone' | 'regular' |
color | string | 'currentColor' |
label | string | none (decorative, aria-hidden) |
An unknown name fails type-checking. At runtime it renders the empty box and logs one warning outside production.
Names
Names are the icon's folder name in kebab case. Three sets share names with the main set, so they are prefixed:
- Flags:
flag-<code>, e.g.flag-pt. - Payment marks:
payment-<name>, e.g.payment-visa. - Social logos:
social-<name>, e.g.social-slack.
Brand logos in the main set keep the -logo suffix (google-logo, slack-logo, notion-logo, github-logo, microsoft-teams-logo, windows-logo). For a brand with no icon, show a neutral logo slot in the app; never letter initials.
The list of names is exported for pickers and tooling:
import { iconNames, isIconName, type IconName } from '@unflowio/icons/registry';Preloading
Icon works on its own. To avoid the empty box on icons that are always visible, such as the main navigation, preload them once:
import { IconProvider } from '@unflowio/ui/components/Icon';
<IconProvider preload={['house', 'chat-circle', 'gear']}>{children}</IconProvider>;Outside React, preloadIcons(names) does the same and skips unknown names, and loadIcon(name) resolves with one icon component. Both are exported from @unflowio/ui/components/Icon.
Bundle size
Every icon stays its own module, and the registry only holds a loader per name (about 26 kB gzipped). A page downloads the modules of the icons it renders, not the whole set. For a handful of fixed icons in a bundle-sensitive spot, importing the icon component directly (@unflowio/icons/<category>/<name>) skips the registry.
All icons
Showing 240 of 2037 icons. Type to narrow down.
acornaddress-bookaddress-book-tabsair-traffic-controlairplaneairplane-in-flightairplane-landingairplane-takeoffairplane-taxiingairplane-tiltairplayalarmalienalign-bottomalign-bottom-simplealign-center-horizontalalign-center-horizontal-simplealign-center-verticalalign-center-vertical-simplealign-leftalign-left-simplealign-rightalign-right-simplealign-topalign-top-simpleamazon-logoambulanceanchoranchor-simpleandroid-logoangleangular-logoapertureapp-store-logoapp-windowapple-logoapple-podcasts-logoapproximate-equalsarchivearmchairarrow-arc-leftarrow-arc-rightarrow-bend-double-up-leftarrow-bend-double-up-rightarrow-bend-down-leftarrow-bend-down-rightarrow-bend-left-downarrow-bend-left-uparrow-bend-right-downarrow-bend-right-uparrow-bend-up-leftarrow-bend-up-rightarrow-circle-downarrow-circle-down-leftarrow-circle-down-rightarrow-circle-leftarrow-circle-rightarrow-circle-uparrow-circle-up-leftarrow-circle-up-rightarrow-clockwisearrow-counter-clockwisearrow-downarrow-down-leftarrow-down-rightarrow-elbow-down-leftarrow-elbow-down-rightarrow-elbow-leftarrow-elbow-left-downarrow-elbow-left-uparrow-elbow-rightarrow-elbow-right-downarrow-elbow-right-uparrow-elbow-up-leftarrow-elbow-up-rightarrow-fat-downarrow-fat-leftarrow-fat-line-downarrow-fat-line-leftarrow-fat-line-rightarrow-fat-line-uparrow-fat-lines-downarrow-fat-lines-leftarrow-fat-lines-rightarrow-fat-lines-uparrow-fat-rightarrow-fat-uparrow-leftarrow-line-downarrow-line-down-leftarrow-line-down-rightarrow-line-leftarrow-line-rightarrow-line-uparrow-line-up-leftarrow-line-up-rightarrow-rightarrow-square-downarrow-square-down-leftarrow-square-down-rightarrow-square-inarrow-square-leftarrow-square-outarrow-square-rightarrow-square-uparrow-square-up-leftarrow-square-up-rightarrow-u-down-leftarrow-u-down-rightarrow-u-left-downarrow-u-left-uparrow-u-right-downarrow-u-right-uparrow-u-up-leftarrow-u-up-rightarrow-uparrow-up-leftarrow-up-rightarrows-clockwisearrows-counter-clockwisearrows-down-uparrows-horizontalarrows-inarrows-in-cardinalarrows-in-line-horizontalarrows-in-line-verticalarrows-in-simplearrows-left-rightarrows-mergearrows-outarrows-out-cardinalarrows-out-line-horizontalarrows-out-line-verticalarrows-out-simplearrows-splitarrows-verticalarticlearticle-mediumarticle-ny-timesasclepiusasteriskasterisk-simpleatatomavocadoaxebabybaby-carriagebackpackbackspacebagbag-simpleballoonbandaidsbankbarbellbarcodebarnbarricadebaseballbaseball-capbaseball-helmetbasketbasketballbathtubbattery-chargingbattery-charging-verticalbattery-emptybattery-fullbattery-highbattery-lowbattery-mediumbattery-plusbattery-plus-verticalbattery-vertical-emptybattery-vertical-fullbattery-vertical-highbattery-vertical-lowbattery-vertical-mediumbattery-warningbattery-warning-verticalbeach-ballbeaniebedbeer-bottlebeer-steinbehance-logobellbell-ringingbell-simplebell-simple-ringingbell-simple-slashbell-simple-zbell-slashbell-zbeltbezier-curvebicyclebinarybinocularsbiohazardbirdblueprintbluetoothbluetooth-connectedbluetooth-slashbluetooth-xboatbombbonebookbook-bookmarkbook-openbook-open-textbook-userbookmarkbookmark-simplebookmarksbookmarks-simplebooksbootboulesbounding-boxbowl-foodbowl-steambowling-ballbox-arrow-downbox-arrow-upboxing-glovebrackets-anglebrackets-curlybrackets-roundbrackets-squarebrainbrandybreadbridgebriefcasebriefcase-metalbroadcast