Expo
Add AXIcons to an Expo app with expo install, in Expo Go or a development build.
Install
npx expo install picks a react-native-svg version that matches your SDK.
npx expo install @axcore/xicons-react-native react-native-svgExpo Go and development builds
Expo Go already includes react-native-svg, so icons work there straight away. In a development build, rebuild after installing so the native module is linked.
npx expo run:ios
npx expo run:androidUsage with Expo Router
import { Tabs } from "expo-router";
import { IconHome, IconSettings } from "@axcore/xicons-react-native";
export default function Layout() {
return (
<Tabs>
<Tabs.Screen
name="index"
options={{ tabBarIcon: ({ color, size }) => <IconHome color={color} size={size} /> }}
/>
<Tabs.Screen
name="settings"
options={{ tabBarIcon: ({ color, size }) => <IconSettings color={color} size={size} /> }}
/>
</Tabs>
);
}The tab bar passes color and size, which map straight onto the icon props.
Something wrong or missing?Open an issue