icon-design by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill icon-design为任务选择合适的图标。将概念映射到图标,提供模板,避免常见错误。
| 概念 | Lucide | Heroicons | Phosphor |
|---|---|---|---|
| 奖项/质量 | Trophy | trophy | Trophy |
| 价格/价值 | Tag | tag | Tag |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 位置 | MapPin | map-pin | MapPin |
| 专业知识 | GraduationCap | academic-cap | GraduationCap |
| 支持 | MessageCircle | chat-bubble-left-right | ChatCircle |
| 安全 | Shield | shield-check | Shield |
| 速度 | Zap | bolt | Lightning |
| 电话 | Phone | phone | Phone |
| 电子邮件 | Mail | envelope | Envelope |
| 用户/个人资料 | User | user | User |
| 团队 | Users | user-group | Users |
| 设置 | Settings | cog-6-tooth | Gear |
| 主页 | Home | home | House |
| 搜索 | Search | magnifying-glass | MagnifyingGlass |
| 勾选/成功 | Check | check | Check |
| 关闭/取消 | X | x-mark | X |
| 菜单 | Menu | bars-3 | List |
| 日历 | Calendar | calendar | Calendar |
| 时钟/时间 | Clock | clock | Clock |
| 心形/收藏 | Heart | heart | Heart |
| 图标库 | 最佳适用场景 | 包 |
|---|---|---|
| Lucide | 通用场景,React 项目 | lucide-react |
| Heroicons | Tailwind 项目,极简风格 | @heroicons/react |
| Phosphor | 需要多种粗细样式 | @phosphor-icons/react |
默认推荐:Lucide(1400+ 个图标,优秀的 React 集成)
详细对比请查看 references/library-comparison.md。
| 使用场景 | Tailwind 类 | 像素 |
|---|---|---|
| 与文本内联 | w-4 h-4 或 w-5 h-5 | 16-20px |
| 功能卡片 | w-8 h-8 | 32px |
| 主视觉区域 | w-10 h-10 或 w-12 h-12 | 40-48px |
| 大型装饰性图标 | w-16 h-16 | 64px |
stroke="currentColor" 让图标继承文本颜色text-primary,而非 text-blue-500动态选择图标会破坏 Tree-Shaking。请使用显式映射:
// 错误做法 - 所有图标都会被打包
import * as Icons from 'lucide-react'
const Icon = Icons[iconName] // 无法 Tree-Shaking!
// 正确做法 - 显式映射
import { Home, Users, Settings, type LucideIcon } from 'lucide-react'
const ICON_MAP: Record<string, LucideIcon> = { Home, Users, Settings }
const Icon = ICON_MAP[iconName]
references/semantic-mapping.mdreferences/icon-templates.md不确定使用哪个图标时:
是关于认可/奖项的吗? → Trophy, Star, Award
是关于金钱/价格的吗? → Tag, DollarSign, CreditCard
是关于位置的吗? → MapPin, Globe, Map
是关于人员/团队的吗? → Users, UserGroup, User
是关于沟通的吗? → MessageCircle, Phone, Mail
是关于安全/信任的吗? → Shield, Lock, ShieldCheck
是关于速度/时间的吗? → Zap, Clock, Timer
是特定行业的吗? → 查看 semantic-mapping.md
仍然不确定? → CheckCircle(通用积极)或 Sparkles(通用功能)
references/semantic-mapping.md - 按类别划分的完整概念→图标对照表references/icon-templates.md - 使用 Tailwind 的 React/HTML 模式references/library-comparison.md - Lucide vs Heroicons vs Phosphor 对比references/migration-guide.md - FA/Material → 现代等效图标迁移指南rules/icon-design.md - 项目修正规则每周安装量
427
代码仓库
GitHub 星标数
650
首次出现
2026 年 1 月 20 日
安全审计
安装于
claude-code343
opencode292
gemini-cli287
codex256
antigravity254
cursor246
Select the right icon for the job. Maps concepts to icons, provides templates, prevents common mistakes.
| Concept | Lucide | Heroicons | Phosphor |
|---|---|---|---|
| Award/Quality | Trophy | trophy | Trophy |
| Price/Value | Tag | tag | Tag |
| Location | MapPin | map-pin | MapPin |
| Expertise | GraduationCap | academic-cap | GraduationCap |
| Support | MessageCircle | chat-bubble-left-right | ChatCircle |
| Security | Shield | shield-check | Shield |
| Speed | Zap | bolt | Lightning |
| Phone | Phone | phone | Phone |
Mail | envelope | Envelope | |
| User/Profile | User | user | User |
| Team | Users | user-group | Users |
| Settings | Settings | cog-6-tooth | Gear |
| Home | Home | home | House |
| Search | Search | magnifying-glass | MagnifyingGlass |
| Check/Success | Check | check | Check |
| Close/Cancel | X | x-mark | X |
| Menu | Menu | bars-3 | List |
| Calendar | Calendar | calendar | Calendar |
| Clock/Time | Clock | clock | Clock |
| Heart/Favourite | Heart | heart | Heart |
| Library | Best For | Package |
|---|---|---|
| Lucide | General use, React projects | lucide-react |
| Heroicons | Tailwind projects, minimal style | @heroicons/react |
| Phosphor | Weight variations needed | @phosphor-icons/react |
Default recommendation : Lucide (1,400+ icons, excellent React integration)
See references/library-comparison.md for detailed comparison.
| Context | Tailwind Class | Pixels |
|---|---|---|
| Inline with text | w-4 h-4 or w-5 h-5 | 16-20px |
| Feature cards | w-8 h-8 | 32px |
| Hero sections | w-10 h-10 or w-12 h-12 | 40-48px |
| Large decorative | w-16 h-16 | 64px |
stroke="currentColor"text-primary, not text-blue-500Dynamic icon selection breaks tree-shaking. Use explicit maps:
// BAD - all icons bundled
import * as Icons from 'lucide-react'
const Icon = Icons[iconName] // Tree-shaken away!
// GOOD - explicit map
import { Home, Users, Settings, type LucideIcon } from 'lucide-react'
const ICON_MAP: Record<string, LucideIcon> = { Home, Users, Settings }
const Icon = ICON_MAP[iconName]
references/semantic-mapping.mdreferences/icon-templates.mdWhen unsure which icon:
Is it about recognition/awards? → Trophy, Star, Award
Is it about money/price? → Tag, DollarSign, CreditCard
Is it about location? → MapPin, Globe, Map
Is it about people/team? → Users, UserGroup, User
Is it about communication? → MessageCircle, Phone, Mail
Is it about safety/trust? → Shield, Lock, ShieldCheck
Is it about speed/time? → Zap, Clock, Timer
Is it trade-specific? → Check semantic-mapping.md
Still unsure? → CheckCircle (generic positive) or Sparkles (generic feature)
references/semantic-mapping.md - Full concept→icon tables by categoryreferences/icon-templates.md - React/HTML patterns with Tailwindreferences/library-comparison.md - Lucide vs Heroicons vs Phosphorreferences/migration-guide.md - FA/Material → modern equivalentsrules/icon-design.md - Correction rules for projectsWeekly Installs
427
Repository
GitHub Stars
650
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code343
opencode292
gemini-cli287
codex256
antigravity254
cursor246
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装