How the React Native output differs
react-native-svg exposes a capitalised component for each SVG element: <path> becomes <Path>, <g> becomes <G> and <linearGradient> becomes <LinearGradient>. The converter maps every supported element, adds a single import line containing only the components you use, and types props as SvgProps.
Elements that have no native equivalent, such as <title>, <desc>, <style> or <metadata>, are dropped with a note so the component does not crash at runtime. class attributes are removed as well, since React Native has no CSS classes.
Setting up react-native-svg
To use the generated component:
- Install the library: npx expo install react-native-svg (Expo) or npm install react-native-svg (bare React Native).
- Save the converted code as a .tsx or .jsx file in your project.
- Render it like any component and pass width, height or color props.
- Enable currentColor and pass a color prop to tint the icon from the parent.
Tips for mobile icons
Keep icons simple: filters and masks are expensive to render on low-end Android devices. Round coordinates to one or two decimals to shrink the JavaScript bundle, and prefer fill over stroke for very small icons because thin strokes can blur on non-retina screens.