Implement reliable agent apply, telemetry v2, analytics retention, guarded rollouts, enrollment, labels and webhooks. Improve ReUI frontend data safety and bounded list loading, and add Docker smoke, recovery and resource checks. Document local verification and pending native acceptance.
4.5 KiB
Icons (ReUI delta over shadcn)
Use the project's configured iconLibrary, put data-icon="inline-start" on an icon before the label inside Button (data-icon="inline-end" on one after it), put no sizing classes on icons inside components, and pass icons as components, not string keys. ReUI adds the following.
Portable icons (library-agnostic)
ReUI components, examples, and blocks are authored to be icon-library-agnostic. The shadcn CLI installs each item's icons in the library named by iconLibrary in components.json - you swap nothing. When iconLibrary is not set, the CLI falls back to lucide, so the icons arrive as lucide-react imports. If that is not the project's library, set iconLibrary before installing, or change the import source and component name to your library, keeping the same icon-name semantics (each key below is an iconLibrary value):
lucide->lucide-reacttabler->@tabler/icons-reactphosphor->@phosphor-icons/reactremixicon->@remixicon/reacthugeicons-> icons from@hugeicons/core-free-icons, rendered throughHugeiconsIconfrom@hugeicons/react
Don't assume lucide-react: read iconLibrary from components.json, and when it is unset, check which icon package the project already uses.
Keep icons purposeful
Icons support the hierarchy, they don't replace it: keep them small, matched to the surrounding density, and decorative ones aria-hidden="true" (an icon-only control still needs an accessible label on the control). Don't add ornamental icons that do no job.
Motion Icons (the @reui/icons/... set)
ReUI ships its own icon set in 4 styles (outline, solid, duotone, filled). Every icon installs from the default path; some also have a real hover animation (motion/react) on the animated path:
npx shadcn@latest add @reui/icons/default/<style>/<name> --yes # static, every icon
npx shadcn@latest add @reui/icons/animated/<style>/<name> --yes # hover-animated, only when the icon has installAnimated
The animated path answers for every icon, but for an icon without a real animation it installs the same static drawing, so only use it when the icon carries installAnimated.
Motion Icons need an Ultimate license for both discovery and install (REUI_LICENSE_KEY, see cli.md). Without it search_icons comes back locked with no results and search returns no icons at all, so check the plan before you promise the user icons: on a free or Pro account, use the project's own iconLibrary instead. On Ultimate, a Motion Icon on the primary action is the 1 hover flourish (see motion.md).
Finding icons:
- Several icons (the common case):
search_icons(concepts[])- up to 24 concepts in one call, the best icons per concept with install commands. Passanimated: trueto get only icons with a real hover animation; a concept with none comes back empty andanimatedNotesays so. - One icon:
searchwithtype: "icon". - Icon results and
get_iconcarryanimated: trueandinstallAnimatedonly when the icon really animates - use those install strings, do not construct paths by hand. - Every icon result carries a
previewUrl(the icon's own page) and athumbnail(its 4 styles side by side) - show or share them so the user can SEE the icon before installing, and look at the thumbnail yourself before trusting a name. - Several icons can fit one concept. Before installing, read
get_icon'swhenNotToUse(each entry names the icon to use instead), and use itslabelas thearia-labelof an icon-only button. - Icon names were revised in the icons v2 update. An old name (
save-2,abstract-18) still answers inget_icon,get_install_command,validate_usageandget_thumbnailwith the icon it became andrenamedFrom, and still installs that same drawing; write the current name in new code. That includes names renamed because they misdescribed the drawing (watchinstalls a sand timer,chevrons-downpoints up), so look at thethumbnailbefore trusting an old name.search_iconsanswers an old name the same way, unless it is also an ordinary word icons are named for today (watch): then it ranks today's icons for the word, andoldNameNotesnames the icon the old name installs.searchranks by current names only, so look an old name up withget_icon, neversearch. Onlytag(it drew a money bag) no longer answers: the reply names the icons to use instead.
The icon-stack component composes multiple icons into a stacked display.