Lucide图标为React Native与NativeWind
代替 lucide-react-native 使用NativeWind。它提供了 Lucide图标 还有一个额外的 className 支持易于集成 NativeWind。
安装
你可以使用npm或yarn:
使用npm:
npm install lucide-nativewind
使用纱:
yarn add lucide-nativewind
用法
lucide-nativewind 是用ES模块构建的,所以它是完全可以摇树的。每个图标都可以作为react组件导入。
所有图标都可以导入,就像使用 lucide-react-native 包
- import { ArrowLeftCircleIcon } from 'lucide-react-native';
+ import { ArrowLeftCircleIcon } from 'lucide-nativewind';
自定义图标
自定义图标可以用 iconWithClassName 添加 className 道具。
import { iconWithClassName } from 'lucide-nativewind';
import MyCustomIcon from './MyCustomIcon';
const MyCustomIconWithClassName = iconWithClassName(MyCustomIcon);
版本控制
版本自动保持同步 lucide-react-native
贡献
欢迎所有贡献。对新/更新图标的贡献/请求应该直接提交给lucide项目: https://github.com/lucide-icons/lucide
常见问题
有哪些图标可用?
所有lucide图标都是可用的,当新的图标被添加到lucide时,这个包将被更新。这个包不打算添加任何额外的或自定义图标。