Skip to content
AXIcons
AXIcons
Theme

React Native

Use AXIcons in React Native with react-native-svg: props, colour and native styling.

Install

Requires react ^19.3.1 and react-native >=0.78.

Terminal
pnpm add @axcore/xicons-react-native react-native-svg

Usage

Same names as the web package. Icons render through react-native-svg.

Toolbar.tsx
import { IconCamera, IconHeartFilled } from "@axcore/xicons-react-native";
import { View } from "react-native";

export function Toolbar() {
  return (
    <View style={{ flexDirection: "row", gap: 16 }}>
      <IconCamera size={24} color="#18181b" />
      <IconHeartFilled size={24} color="#e11d48" />
    </View>
  );
}

Props

Icons accept every react-native-svg SvgProps prop.

PropTypeDefaultWhat it does
sizenumber | string24Width and height in density-independent pixels.
colorstringnoneSets currentColor for both stroke and fill icons.
strokeWidthnumber1.75Stroke weight of outline icons.

Differences from the web

  • There is no CSS cascade: pass color on each icon.
  • There is no className prop. With NativeWind, size a wrapping View.
  • There is no title prop; label the pressable wrapper with accessibilityLabel.
React
<Pressable accessibilityRole="button" accessibilityLabel="Take photo">
  <IconCamera size={24} color="#18181b" />
</Pressable>

Troubleshooting

  • “requireNativeComponent: RNSVG… was not found”: react-native-svg is not linked. Install it in the app and rebuild the native project.
  • The icon renders black: pass color. Native SVG has no inherited text colour.

Something wrong or missing?Open an issue

Jump to
Browse all iconsIcon library
InstallationGetting started
Quick startGetting started
ReactIntegrations
React NativeIntegrations
↑↓ navigateopen⌘K toggle