⚡ A lightweight, native-powered React Native library for loading, caching, and rendering SVG images — without WebView or JS-based parsing.
- 🚀 Native rendering (no WebView)
- ⚡ Fast & efficient SVG loading
- 💾 Built-in caching support
- 📱 Cross-platform (iOS & Android)
- 🎨 Optional skeleton & placeholders
- 🔧 Easy to integrate
npm install react-native-svg-renderor
yarn add react-native-svg-renderimport { SvgUrlView } from 'react-native-svg-render';
<SvgUrlView
url="https://example.com/icon.svg"
width={30}
height={30}
/>;Add the following to your ios/Podfile:
pod 'SVGKit', '3.0.0'
pod 'CocoaLumberjack/Swift', '3.8.0'Add this at the bottom of your Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'SVGKit'
target.build_configurations.each do |config|
config.build_settings['USE_HEADERMAP'] = 'NO'
config.build_settings['ALWAYS_SEARCH_USER_PATHS'] = 'NO'
config.build_settings['HEADER_SEARCH_PATHS'] = [
'$(inherited)',
'${PODS_ROOT}/Headers/Public/SVGKit',
'${PODS_ROOT}/SVGKit/Source',
'${PODS_ROOT}/SVGKit/Source/DOM classes',
'${PODS_ROOT}/SVGKit/Source/Parsers',
'${PODS_ROOT}/SVGKit/Source/Exporters'
]
end
end
end
endcd ios
pod installThen rebuild your project in Xcode.
| Prop | Type | Description | Default | Platform |
|---|---|---|---|---|
url |
string |
Remote URL or local SVG path | required | iOS + Android |
width |
number |
Width of SVG | — | iOS + Android |
height |
number |
Height of SVG | — | iOS + Android |
style |
ViewStyle |
Container styling | — | iOS + Android |
showSkeleton |
boolean |
Show loading skeleton | true |
iOS only |
placeholder |
string |
Placeholder while loading | — | iOS only |
failedPlaceholder |
string |
Placeholder on failure | — | iOS only |
- Android skeleton & placeholder support is coming soon 🚧
- Designed for performance-critical rendering scenarios
We welcome contributions!
MIT
Most React Native SVG solutions rely on:
- ❌ WebView
- ❌ JS parsing (slow for large SVGs)
This library solves that by:
- ✅ Using native rendering
- ✅ Improving performance
- ✅ Reducing memory overhead
⭐ If you find this useful, consider giving it a star!