Card Kind Icons
A nine-glyph icon set for labeling card-shaped learning artifacts — lesson, problem, lab, debug, review, capstone, quiz, arena, sandbox. Every glyph lives on a 24×24 grid with 1.5–2px strokes; everything paints in currentColor so the host tints with text-* utilities.
lesson
problem
lab
debug
review
capstone
quiz
arena
sandbox
Customize
Visual
lesson
28px
1.6
Installation
npx shadcn@latest add https://craftbits.dev/r/card-kind-icons.jsonUsage
import { CardKindIcon } from "@craft-bits/core";
<CardKindIcon kind="lesson" />
<CardKindIcon kind="problem" size={20} className="text-cb-accent" />Or destructure a per-kind component when you need a stable reference:
import { CARD_KIND_ICONS } from "@craft-bits/core";
const { lesson: LessonIcon, capstone: CapstoneIcon } = CARD_KIND_ICONS;Understanding the component
- One component, one
kindprop. A singleCardKindIconswitches between all nine glyphs — there's no per-kind import. Kind names mirror common card types. currentColoreverywhere. Stroke and fill (where used) resolve tocurrentColor. Tint with anytext-cb-*utility.- Sharp at small sizes. Geometry is locked to integer (or .5 stroke-centered) coordinates on the 24×24 grid. The default
strokeWidth={1.6}matches other line-icon sets at 24px. CARD_KIND_ICONSmap for menus. When you need to pass a component reference (e.g. populating a menu config),CARD_KIND_ICONS[kind]returns aforwardRefcomponent bound to that kind.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
kind | CardKind | required | One of the nine kinds: lesson, problem, lab, debug, review, capstone, quiz, arena, sandbox. |
size | number | 24 | Square size in pixels. |
strokeWidth | number | 1.6 | Stroke width on the 24×24 grid. |
className | string | — | Extra classes merged onto the root SVG. |
Accessibility
- The root SVG carries
aria-hidden="true"because these glyphs accompany visible text labels in the contexts they were designed for. If you use the icon without a sibling label, override witharia-labelandaria-hidden={false}. - Stroke contrast is the consumer's responsibility — pair with
text-cb-fg/text-cb-fg-mutedfor WCAG AA contrast oncb-bgbackgrounds. - No motion. Reduced-motion users see the same static glyph.
Credits
- Extracted from:
craftingattention(app/src/lessons/primitives/chrome/icons/CardKindIcons.tsx). - Linear / Cursor / Vercel-aesthetic line icons; geometry over decoration.