@tabler/icons-react-native
v3.52.0
Published
A set of free MIT-licensed high-quality SVG icons for you to use in your web projects.
Readme
Tabler Icons for React Native
Sponsors
If you want to support our project and help us grow it, you can become a sponsor on GitHub or donate on PayPal.
Installation
npm install @tabler/icons-react-nativeyarn add @tabler/icons-react-nativepnpm add @tabler/icons-react-nativeThe package requires react-native-svg 13 or newer as a peer dependency.
You can also download the latest release from GitHub.
Usage
The package is built with ES modules, so unused icons are tree-shaken from your bundle. Each icon is exported as a component that renders with react-native-svg.
import { IconArrowLeft } from '@tabler/icons-react-native';
const App = () => {
return <IconArrowLeft />;
};
export default App;Pass props to adjust the icon:
<IconArrowLeft color="red" size={48} strokeWidth={1.5} />Importing individual icons
Metro does not remove unused exports by default, so importing from the package root adds every icon to your bundle. To include only the icons you use, import each one from its own path:
import IconArrowLeft from '@tabler/icons-react-native/IconArrowLeft';
import IconHeartFilled from '@tabler/icons-react-native/IconHeartFilled';The path is the component name. This relies on the package exports map, which Metro resolves by default since React Native 0.79 (in earlier versions, enable resolver.unstable_enablePackageExports).
Props
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| size | number | string | 24 | Width and height of the icon |
| color | string | currentColor | Stroke color for outline icons, fill color for filled icons |
| strokeWidth | number | string | 2 | Stroke width, outline icons only |
| title | string | – | Accessibility label read by screen readers (sets accessible, accessibilityRole="image" and accessibilityLabel on the Svg) |
Any other prop is forwarded to the underlying Svg component. Components forward refs and ship with TypeScript declarations.
Contributing
Bug reports and icon requests are welcome in the issue tracker. Caught a mistake in this page? Edit it on GitHub.
License
Tabler Icons is licensed under the MIT License.
