IconBox
Rounded box housing a lucide icon with background tint. Used inside FeatureCard, NavItem grids, stat blocks.
Live preview
Tones
Sizes
Shape variants
Composition use-cases
Smart matching
FeatureCard — IconBox at md size, brand tone, rounded-xl
Khoá học
NavItem grid — IconBox top-left, success tone, study context
Active session
StatBlock header — IconBox marker, warning tone, attention context
Import & files
import { IconBox } from "@/components/ui/IconBox";- Source file
components/ui/IconBox.tsx
Spec
Spec Props · Axes · Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
icon | ReactNode | - | — |
bg | string | 'bg-slate-50' | — |
color | string | 'text-slate-700' | — |
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | — |
Variants · Tones · Sizes
- Sizes
- smmdlgxl
Usage
Pair `bg` + `color` from the same family (e.g., `bg-blue-50` + `text-blue-600`). Not a standalone tile - compose inside a card.
Figma note: Playground composition pattern - not a single Figma component category. See Playground source.
Examples
Examples 1
- Size matrix (sm → xl) with skill colors
AI context
AI context
Markdown summary safe to paste into Claude / ChatGPT / Cursor — includes name, status, import, props, axes, examples, figma source.
# IconBoxDomain: general · Category: layoutDesign: extension · Code: code-only
## DescriptionRounded box housing a lucide icon with background tint. Used inside FeatureCard, NavItem grids, stat blocks.
## Import```tsimport { IconBox } from "@/components/ui/IconBox";```Source: `components/ui/IconBox.tsx`
## Props (4)| Prop | Type | Default | Description ||---|---|---|---|| `icon` | `ReactNode` | - | || `bg` | `string` | 'bg-slate-50' | || `color` | `string` | 'text-slate-700' | || `size` | `'sm' | 'md' | 'lg' | 'xl'` | 'md' | |
## AxesSizes: `sm`, `md`, `lg`, `xl`
## UsagePair `bg` + `color` from the same family (e.g., `bg-blue-50` + `text-blue-600`). Not a standalone tile - compose inside a card.
## Examples- **Size matrix (sm → xl) with skill colors**Related
Status legend
Status legend
- Stable
- Design + code shipped, full DS parity.
- Partial
- Design ready, some variants/states missing in code.
- Coded
- Implemented in code; design canon may not yet exist.
- Design only / Code only
- One side present; awaiting the other.
Phase 1.X-5.2 detail view — read-only metadata. Code preview + recipe + live demo deferred (need @dol/ui registry integration).