This skill ensures React components use Carbon Icons from @carbon/icons-react with proper sizing, color, alignment, and accessibility.
npx playbooks add skill corlab-tech/skills --skill carbon-icons
Use @carbon/icons-react for all icons. Never create inline SVGs or extract icons from Figma.
import { Search, ChevronDown, Close, View, ViewOff, Information, Add } from '@carbon/icons-react';
<Search size={20} />
<Close size={16} />
Icons render as inline SVGs with currentColor fill — they inherit the parent's text color.
| Size | Context | Pairs with |
|------|---------|------------|
| 16 | Inputs, badges, compact buttons, inline indicators | text-body-md (14px) |
| 20 | Default — buttons, form fields, nav items | text-body-lg (16px) |
| 24 | Section headers, cards, medium emphasis | text-heading-md–text-heading-lg |
| 32 | Hero sections, empty states, pictograms | text-heading-xl+ |
Keep icon size consistent within a component. Do not mix sizes arbitrarily.
currentColor — set via Tailwind text color on parent or icontext-icon, text-icon-hover, text-icon-disabled, text-text, text-gray-600, etc.// ✅ Icon inherits parent color
<span className="text-gray-600 flex items-center gap-1">
<Search size={16} /> Search
</span>
// ❌ WRONG — icon has different color than text
<span className="text-gray-600">
<Search size={16} className="text-primary-600" /> Search
</span>
items-center// ✅ Correct
<div className="flex items-center gap-2">
<Information size={16} />
<span>Help text</span>
</div>
Interactive icons need minimum 44px touch target. Add padding if the icon is smaller:
<button className="p-3 flex items-center justify-center" aria-label="Close">
<Close size={16} />
</button>
The Figma Design System (node 2377:25170) labels icons into 3 categories:
@carbon/icons-react.Browse: https://carbondesignsystem.com/elements/icons/library/
Import names use PascalCase. Examples:
chevron-down → ChevronDownview / view-off → View / ViewOffclose → Closecheckmark → Checkmarkwarning → Warninginformation → Informationadd → Addsubtract → Subtractedit → Edittrash-can → TrashCanoverflow-menu-vertical → OverflowMenuVertical@carbon/pictograms-react@carbon/icons-react<svg> manually for standard UI iconscurrentColor — set color via Tailwind text classesitems-center)Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.