Band Icons
A 24×24 icon set where each glyph encodes the substance of its phase, not a generic motif. Pass band="math" (or any registered band name) and the matching SVG renders inline.
math
tensors
learning
language
systems
agency
Customize
Icon set
32px
fg
Installation
npx shadcn@latest add https://craftbits.dev/r/band-icons.jsonUsage
import { BandIcon } from "@craft-bits/core";
<BandIcon band="math" size={24} />Understanding the component
- Single inline SVG.
BandIconrenders one<svg viewBox="0 0 24 24">and switches only the inner paths based onband. No per-icon imports or bundle bloat from a glyph file per band. currentColorstrokes. Every glyph usesstroke="currentColor", so coloring the icon is just settingcolor(or atext-cb-*token) on the parent.- Crisp at 16px. Coordinates land on integer / half-integer values so the 1.6px stroke stays sharp at small sizes.
BAND_ICONSmap for iteration. The fullRecord<BandName, ReactNode>is exported so legends and sidebars can iterate the set without re-listing band names.
Variants / Examples
// Tint via parent color.
<span className="text-cb-accent">
<BandIcon band="learning" size={32} />
</span>
// Iterate the full set.
import { BAND_NAMES } from "@craft-bits/core";
{BAND_NAMES.map((b) => <BandIcon key={b} band={b} />)}Props
| Prop | Type | Default | Description |
|---|---|---|---|
band | 'math' | 'tensors' | 'learning' | 'language' | 'systems' | 'agency' | required | Which glyph to render. |
size | number | 24 | Pixel width / height. |
className | string | — | Extra classes merged onto the <svg>. |
Accessibility
- Each glyph is decorative (
aria-hidden="true") by default. If the icon carries meaning on its own, pair it with a visible text label or override witharia-labelon the consuming element. - Strokes use
currentColorand the default fill isnone, so contrast tracks the parent text color and inherits anyprefers-contrastoverrides applied site-wide.
Credits
- Extracted from:
craftingattention(app/src/lessons/primitives/chrome/icons/BandIcons.tsx).