📦 MegaWall3 / react-native-iconpark

1 stars 0 forks 👁 1 watching ⚖️ Apache License 2.0
📥 Clone https://github.com/MegaWall3/react-native-iconpark.git
HTTPS git clone https://github.com/MegaWall3/react-native-iconpark.git
SSH git clone git@github.com:MegaWall3/react-native-iconpark.git
CLI gh repo clone MegaWall3/react-native-iconpark
IridiumMetal IridiumMetal first commit 5c46eb6 1 months ago 📝 History
📁 .github
📁 scripts
📁 src
📄 .gitignore
📄 .npmignore
📄 .npmrc
📄 LICENSE
📄 README.md
📄 README.md

React Native IconPark

English | 简体中文


English

Transform IconPark SVG icons into React Native components using react-native-svg.

Original Project: IconPark · GitHub

Installation

npm install react-native-iconpark react-native-svg

Usage

import { Home, Camera, User } from 'react-native-iconpark';

// Basic
<Home size={24} />

// Outline theme (default)
<Camera theme="outline" size={32} fill="#000" />

// Filled theme
<User theme="filled" size={32} fill="#333" />

// Two-tone theme
<Camera theme="two-tone" size={32} fill={['#333', '#2F88FF']} />

// Multi-color theme
<Camera theme="multi-color" size={32} fill={['#333', '#2F88FF', '#FFF', '#43CCF8']} />

Props

PropTypeDefault
sizenumber \| string24
fillstring \| string[]'#333'
theme'outline' \| 'filled' \| 'two-tone' \| 'multi-color''outline'
strokeWidthnumber4
strokeLinecap'butt' \| 'round' \| 'square''round'
strokeLinejoin'miter' \| 'round' \| 'bevel''round'
styleViewStyle-
For more details, please refer to IconPark Official Documentation.

License

Apache-2.0


简体中文

使用 react-native-svg 将 IconPark SVG 图标包装为 React Native 组件。

原项目: IconPark · GitHub

安装

npm install react-native-iconpark react-native-svg

使用

import { Home, Camera, User } from 'react-native-iconpark';

// 基础用法
<Home size={24} />

// 线性主题(默认)
<Camera theme="outline" size={32} fill="#000" />

// 填充主题
<User theme="filled" size={32} fill="#333" />

// 双色主题
<Camera theme="two-tone" size={32} fill={['#333', '#2F88FF']} />

// 多色主题
<Camera theme="multi-color" size={32} fill={['#333', '#2F88FF', '#FFF', '#43CCF8']} />

属性

属性类型默认值
sizenumber \| string24
fillstring \| string[]'#333'
theme'outline' \| 'filled' \| 'two-tone' \| 'multi-color''outline'
strokeWidthnumber4
strokeLinecap'butt' \| 'round' \| 'square''round'
strokeLinejoin'miter' \| 'round' \| 'bevel''round'
styleViewStyle-
更多详情请参考 IconPark 官方文档

许可证

Apache-2.0