bloom-icons
v0.16.0
Published
Bloom: a 24px icon set in five styles grown from one drawing per concept.
Maintainers
Readme
Bloom icons
A 24px SVG icon set in five styles: Linear, Line Duotone, Outline, Bold and Bold Duotone. Each icon is drawn once
as Linear and the other four styles are grown from that drawing, so switching style never shifts an icon. Every
file draws in currentColor.
This package holds every file (dist/<style>/<name>.svg), the list of icons (dist/icons.json) and a small command
that finds names by use word and prints files. It has no dependencies and runs no install scripts.
Find a name, then take the file
Bloom names describe shapes (gear, magnifier, tray-arrow-down); uses live in tags (settings, search,
download). Look names up instead of guessing them:
npx -y [email protected] find settings download "arrow right"
npx -y [email protected] get gear --style linear > gear.svgThe same command runs with pnpm dlx [email protected], yarn dlx [email protected] and
bunx [email protected], or as bloom-icons once the package is installed in a project.
| Command | What it prints |
|---|---|
| find <word> [<word> ...] | The best icons for each word, with category and tags. An old name says what it became; external-link is read as two words. Options: --limit n, --json. |
| get <name> [--style s] [--motion \| --play] | The SVG file, byte for byte. Styles: linear (default), line-duotone, outline, bold, bold-duotone. --motion gives the version that moves on hover, for icons find marks “moves on hover”; --play the version that plays on an event or a state, for icons find marks “plays on”. |
| mcp | An MCP server on stdio with the tools find_icons and get_icon. |
With no command it prints its help. npx takes --help and --version as its own options, so put -- before them:
npx -y [email protected] -- --version.
For AI agents
Connect the MCP server so an agent looks names up instead of guessing them.
Claude Code, for every project (leave out --scope user for the current project only):
claude mcp add --scope user bloom -- npx -y [email protected] mcpClaude Desktop, Cursor and other clients that read an mcpServers list:
{ "mcpServers": { "bloom": { "command": "npx", "args": ["-y", "[email protected]", "mcp"] } } }The package also carries a Claude Code skill in skills/bloom/: link that folder into ~/.claude/skills/ and
sessions learn when and how to use Bloom.
Use the files directly
In a bundler:
bloom-icons/dist/linear/gear.svg(through your SVG loader).From a CDN:
https://cdn.jsdelivr.net/npm/[email protected]/dist/linear/gear.svg.The list:
bloom-icons/icons.json, with every name, category and tag, the styles and the renames.Moving on hover: icons marked
"motion": trueinicons.jsonalso havedist/motion/<style>/<name>.svg. Paste one inline and it moves while the button or link around it is hovered, from its own<style>: no script, never on touch or keyboard focus, still under reduced motion. Pages whose Content-Security-Policy refuses inline styles linkdist/motion.cssonce.Playing on an event or a state: icons with a
"play"list inicons.jsonalso havedist/play/<style>/<name>.svg. Paste one inline inside a button or link and set an attribute on that button:data-bloom-playplays it once (a bell rings, a check draws itself, a heart beats),aria-busy="true"loops it while busy (spinner,arrows-clockwise),aria-expanded="true"turns it or moves a panel's divider and holds (chevron-down,panel-left), andaria-checked="true"on a switch (role="switch") moves its knob to the other end and holds (toggle-left). The list says which ofplay,busy,expandedandcheckedan icon answers.--bloom-speedon any parent multiplies every duration. Under reduced motion nothing travels, and a held pose shows at once. To play it again, remove the attribute, read the layout once and set it again:function playIcon(button) { button.removeAttribute('data-bloom-play'); button.getBoundingClientRect(); // a layout read, so the next line starts the animation again button.setAttribute('data-bloom-play', ''); }A play file carries no hover motion. To play an icon each time a mouse or trackpad comes onto its button, as the icon browser at bloomicons.com does, call
playOnHover(button)from this script: it plays the whole motion once, lets it finish when the pointer leaves, and does nothing on touch, keyboard focus or reduced motion.// Plays a Bloom play file once each time a mouse or trackpad comes onto the button around it. function playOnHover(button) { const isPlaying = () => button.getAnimations({ subtree: true }).some((animation) => animation.animationName?.startsWith('bloom-') && animation.playState === 'running'); button.addEventListener('pointerenter', (event) => { if (event.pointerType !== 'mouse' || isPlaying() || matchMedia('(prefers-reduced-motion: reduce)').matches) return; button.removeAttribute('data-bloom-play'); button.getBoundingClientRect(); // a layout read, so the next line starts the animation again button.setAttribute('data-bloom-play', ''); }); // Taken off once played, so a later redraw of the icon does not play it again. button.addEventListener('animationend', () => { if (!isPlaying()) button.removeAttribute('data-bloom-play'); }); }Pages whose Content-Security-Policy refuses inline styles link
dist/play.cssonce.
Renamed icons
renames in dist/icons.json lists every name that was renamed or removed, newest first, with the icon to use now.
find and get read it too: get earth answers that earth was removed in 0.6.0 and that globe replaces it.
License
MIT. The full text is in LICENSE.
