better-icons
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBetter Icons
Better Icons
Search and retrieve icons from 200+ libraries via Iconify.
通过Iconify从200+个图标库中搜索和获取图标。
CLI
CLI
bash
undefinedbash
undefinedSearch icons
搜索图标
better-icons search <query> [--prefix <prefix>] [--limit <n>] [--json]
better-icons search <query> [--prefix <prefix>] [--limit <n>] [--json]
Get icon SVG (outputs to stdout)
获取图标SVG(输出到标准输出)
better-icons get <icon-id> [--color <color>] [--size <px>] [--json]
better-icons get <icon-id> [--color <color>] [--size <px>] [--json]
Setup MCP server for AI agents
为AI Agent设置MCP服务器
better-icons setup [-a cursor,claude-code] [-s global|project]
undefinedbetter-icons setup [-a cursor,claude-code] [-s global|project]
undefinedExamples
示例
bash
better-icons search arrow --limit 10
better-icons search home --json | jq '.icons[0]'
better-icons get lucide:home > icon.svg
better-icons get mdi:home --color '#333' --jsonbash
better-icons search arrow --limit 10
better-icons search home --json | jq '.icons[0]'
better-icons get lucide:home > icon.svg
better-icons get mdi:home --color '#333' --jsonIcon ID Format
图标ID格式
prefix:namelucide:homemdi:arrow-rightheroicons:checkprefix:namelucide:homemdi:arrow-rightheroicons:checkPopular Collections
热门图标库
lucidemdiheroiconstablerphrisolariconamoonlucidemdiheroiconstablerphrisolariconamoonMCP Tools (for AI agents)
MCP工具(适用于AI Agent)
| Tool | Description |
|---|---|
| Search across all libraries |
| Get single icon SVG |
| Batch retrieve multiple icons |
| Browse available icon sets |
| Smart recommendations for use cases |
| Find variations across collections |
| Add icon to project file |
| List icons in project |
| 工具 | 描述 |
|---|---|
| 跨所有图标库搜索 |
| 获取单个图标SVG |
| 批量获取多个图标 |
| 浏览可用图标集 |
| 根据使用场景提供智能推荐 |
| 跨图标库查找相似图标 |
| 将图标添加到项目文件 |
| 列出项目中的图标 |
TypeScript Interfaces
TypeScript 接口
typescript
interface SearchIcons {
query: string
limit?: number // 1-999, default 32
prefix?: string // e.g., 'mdi', 'lucide'
category?: string // e.g., 'General', 'Emoji'
}
interface GetIcon {
icon_id: string // 'prefix:name' format
color?: string // e.g., '#ff0000', 'currentColor'
size?: number // pixels
}
interface GetIcons {
icon_ids: string[] // max 20
color?: string
size?: number
}
interface RecommendIcons {
use_case: string // e.g., 'navigation menu'
style?: 'solid' | 'outline' | 'any'
limit?: number // default 10
}
interface SyncIcon {
icons_file: string // absolute path
framework: 'react' | 'vue' | 'svelte' | 'solid' | 'svg'
icon_id: string
component_name?: string
}typescript
interface SearchIcons {
query: string
limit?: number // 1-999,默认值32
prefix?: string // 例如:'mdi', 'lucide'
category?: string // 例如:'General', 'Emoji'
}
interface GetIcon {
icon_id: string // 'prefix:name' 格式
color?: string // 例如:'#ff0000', 'currentColor'
size?: number // 像素
}
interface GetIcons {
icon_ids: string[] // 最多20个
color?: string
size?: number
}
interface RecommendIcons {
use_case: string // 例如:'navigation menu'
style?: 'solid' | 'outline' | 'any'
limit?: number // 默认值10
}
interface SyncIcon {
icons_file: string // 绝对路径
framework: 'react' | 'vue' | 'svelte' | 'solid' | 'svg'
icon_id: string
component_name?: string
}API
API
All icons from
https://api.iconify.design所有图标来自
https://api.iconify.design