@bettercms-ai/icons
The BetterCMS icon set for React: 473 icons, one ES module each. Every icon renders an
<svg data-bcms-icon="<name>"> sized 1em that draws in currentColor.
npm install @bettercms-ai/icons
Imports
| Import | What you get |
|---|---|
@bettercms-ai/icons/<name> | One icon, e.g. @bettercms-ai/icons/add-circle (default and named export). |
@bettercms-ai/icons | Every icon as a named export (AddCircleIcon, …) plus ICON_NAMES. |
@bettercms-ai/icons/names | ICON_NAMES and the IconName type, with no React. |
@bettercms-ai/icons/load | loadIcon(name): loads one icon on demand; unknown names resolve to null. |
@bettercms-ai/icons/map | The icons name map, <Icon symbol="…" />, IconSymbol, IconMap. Pulls in every icon. |
import AddCircleIcon from "@bettercms-ai/icons/add-circle";
import { loadIcon } from "@bettercms-ai/icons/load";
const Icon = await loadIcon(field.ui.icon); // null when the name is not in ICON_NAMES
ICON_NAMES is sorted by code point and is the same list BetterCMS accepts for a field's ui.icon.
ES modules only. React 18.3 or 19 is a peer dependency.
License
MIT. The icon artwork keeps its original MIT copyright notices; see LICENSE.