@kingsoft-ai/icons
v0.1.6
Published
金山AI React 图标库,提供多种风格与完善的 TypeScript 支持。
Readme
@kingsoft-ai/icons
金山AI React 图标库,提供多种风格与完善的 TypeScript 支持。
核心特性
- Tree-shaking 友好,按需加载
- Outline、Bold、Broken、Bulk、Two-tone 等风格
size、color、className等通用属性- 默认继承
currentColor,便于主题化 - 无副依赖,SVG 经过手工优化
安装
pnpm add @kingsoft-ai/icons
# 或 npm install / yarn add快速上手
import { ArrowRightOutline } from '@kingsoft-ai/icons'
export function App() {
return <ArrowRightOutline size={24} color="#1f2933" />
}Props 总览
| 属性 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| size | number \| string | 24 | 支持像素或 CSS 尺寸 |
| color | string | 'currentColor' | 十六进制、RGB 或继承色 |
| className | string | - | 自定义样式类 |
| style | CSSProperties | - | 内联样式 |
| 其他 | SVGProps<SVGSVGElement> | - | 原生 SVG 属性 |
最佳实践
- 仅按需导入所需图标,减小包体积
- 通过设计令牌或 CSS 变量统一控制尺寸
开发脚本
pnpm run build:lib
pnpm run clean