Lucide icons for Taro React - 为 Taro 框架封装的 Lucide 图标库 #18575
Unanswered
NoyaMrXiao
asked this question in
生态
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
lucide-taro-react
Lucide icons for Taro React - 为 Taro 框架封装的 Lucide 图标库
Installation
Usage
基础使用
使用 Tailwind 类名
支持从 Tailwind 类名中自动提取尺寸和颜色:
自定义创建图标
如果需要从 SVG 字符串创建自定义图标:
批量创建图标
如果需要批量创建自定义图标:
Props
所有图标组件都支持以下属性:
size?: number | string- 图标大小(默认: 24),支持数字或字符串(如 "24px")color?: string- 图标颜色(默认: 'currentColor')className?: string- 支持 Tailwind 类名,会自动提取w-*、h-*、text-*等类名style?: any- 自定义样式@tarojs/components/Image支持的属性Tailwind 类名支持
w-4,w-5,w-6,w-8,w-10,w-12,w-16或对应的h-*类名text-*类名(如text-red-500,text-blue-600,text-primary-500等)查看所有可用图标
所有图标都可以直接导入使用。如果需要查看所有可用的图标名称:
所有图标都支持 tree-shaking,只导入使用的图标会被打包。
Development
构建
本地测试
发布
查看 PUBLISH.md 了解详细的发布步骤。
更多信息
License
MIT
Beta Was this translation helpful? Give feedback.
All reactions