@elevyg/react-native-ionicons
Version:
Ionicons 5 for React Native
63 lines (42 loc) • 1.55 kB
Markdown

Use the latest [Ionicons](https://ionicons.com) (5.5.2) in your React Native project :tada:.
<img src="Screenshots/icons.gif" height=400>
Ionicons is a completely open-source icon set with 1,300 icons.
Each icon has an outline, filled, and sharp variant.
<img width="100" src="https://unpkg.com/ionicons@5.5.2/dist/svg/glasses-outline.svg">
<img width="100" src="https://unpkg.com/ionicons@5.5.2/dist/svg/glasses.svg">
<img width="100" src="https://unpkg.com/ionicons@5.5.2/dist/svg/glasses-sharp.svg">
```
npm install @michaelbnd/react-native-ionicons
npm install react-native-svg
npx pod-install
```
```javascript
import React from 'react';
import {View} from 'react-native';
import {Icon} from '@michaelbnd/react-native-ionicons';
export default function App() {
return (
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center', flexDirection: 'row'}}>
<Icon name="rocket-outline" size={64} color="#000" />
<Icon name="rocket" size={64} color="#000" />
<Icon name="rocket-sharp" size={64} color="#000" />
</View>
);
}
```
<img src="Screenshots/rockets.png" height=400>
Add the lines below in your package.json inside the "jest" key if you are testing your project with [Jest](https://jestjs.io).
```
"transformIgnorePatterns": [
"/node_modules/(?!react-native)/.+"
]
```