4.0.0 • Published 1 year ago
react-native-heroicons v4.0.0
React Native Heroicons
Heroicons are designed by Steve Schoger and published by Tailwind Labs.
A full directory of all available icons can be found here:
Installation
react-native-heroicons requires react-native-svg v9 or higher
yarn
yarn add react-native-heroicons react-native-svg
npm
npm i react-native-heroicons react-native-svg
Usage
Specific icons:
import React from "react";
import { View } from "react-native";
import { SparklesIcon as SparklesIconMicro } from "react-native-heroicons/micro";
// Old solid style from heroicons v1
import { SparklesIcon as SparklesIconMini } from "react-native-heroicons/mini";
import { SparklesIcon } from "react-native-heroicons/solid";
import { SparklesIcon as SparklesIconOutline } from "react-native-heroicons/outline";
const App = () => {
return (
<View>
<SparklesIconMicro />
<SparklesIconMini />
<SparklesIcon />
<SparklesIconOutline />
</View>
);
};
export default App;
Entire icon pack:
import React from "react";
import * as Icons from "react-native-heroicons/solid";
const App = () => {
return <Icons.SparklesIcon />;
};
export default App;
Customization
Icons can be adjusted with the size
prop.
Defaults are 16
for micro
, 20
for mini
and 24
for solid
/outline
: 24):
import { SparklesIcon as SparklesIconOutline } from "react-native-heroicons/outline";
// ...
<SparklesIconOutline color="red" fill="black" size={42} />;
4.0.0
1 year ago
3.2.1
1 year ago
3.2.1-beta.0
2 years ago
3.2.0
3 years ago
3.1.0
3 years ago
3.0.0
3 years ago
2.2.0
3 years ago
2.1.0
3 years ago
2.0.2
4 years ago
2.0.1
4 years ago
1.6.0
4 years ago
1.5.0
4 years ago
2.0.0
4 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago