react-native-skia README

The project's README from github.com/wcandillon/react-native-skia. As one markdown file: README.md.

React Native Skia

CI npm version

React Native Skia Logo

React Native Skia bring Skia, the rendering engine behind Google Chrome to React Native to React Native.

We use Graphite, Skia’s new GPU backend built on WebGPU (Dawn). It plugs directly into React Native WebGPU, so 2D drawings, 3D scenes, and machine learning models share the same GPU device and the same canvas, at zero cost. The result is a unified GPU runtime for React Native. See Documentation.

React Native Skia has been downloaded more than 60 millions times on npm. And today, it powers the user-experiences of some of the top apps on the App Store and Google Play, including several that have won awards from Apple, Google, and Expo.

Platinum Sponsors

Expo

Gold Sponsors

Hark

Getting Started

yarn add react-native-skia

Installation instructions

v3 and v2

React Native Skia v3 renders with Graphite, Skia's new GPU backend. It runs on Metal on Apple platforms and on Vulkan on Android.

v3 v2
npm react-native-skia react-native-skia@2
Skia backend Graphite (Vulkan/Metal) Ganesh (OpenGL/Metal)
Architecture multi-threaded single-threaded
Platforms iOS, Android, macOS, Mac Catalyst, tvOS, Web iOS, Android, macOS, Mac Catalyst, tvOS, Android TV, Web
Branch main 2.x
Documentation wcandillon.github.io/react-native-skia wcandillon.github.io/react-native-skia/v2

v2 is still maintained. To upgrade from v2 or from @shopify/react-native-skia, follow the migration guide.

WebGPU

Graphite runs on Dawn, Google's WebGPU implementation. With React Native WebGPU installed alongside it, Skia and WebGPU share the same GPU device and can exchange textures without any copy. This also works with three.js. See the WebGPU documentation.

Contributing

For detailed information on library development, building, testing, and contributing guidelines, please see CONTRIBUTING.md.

react-native-skia (wcandillon/react-native-skia)

Searching Database…

What is this?React Native Skia brings Google's Skia graphics engine (the renderer used by Chrome and Android) to React Native, letting you write high-performance 2D graphics, shaders, and animations using a React component API.
Is it a UI library or a low-level graphics engine?It's a library that exposes Skia's drawing primitives (paths, shaders, images, text) as declarative React components, so you build graphics by composing components rather than calling imperative canvas APIs directly.
How do I add it to a project?Install it via your package manager (e.g. yarn add @shopify/react-native-skia) into an existing React Native project, then import components like Canvas, Path, and Skia from the package to start drawing.
Does it work with Expo and the New Architecture?It supports both Expo (managed and bare) and plain React Native projects, and is compatible with the New Architecture (Fabric/TurboModules).
Does it work the same on web?Web support is provided via CanvasKit/WASM rather than native Skia, so behavior and performance on web can differ from the native iOS/Android implementations.
Which platforms does it run on?It targets iOS and Android as native React Native platforms, with experimental support for web via WebAssembly.
What kind of graphics can it draw out of the box?It supports paths, shapes, images, text, gradients, shaders (SKSL), blend modes, filters, and complex animations, all driven by Reanimated-style shared values for smooth 60fps+ updates.
Why use this instead of react-native's built-in Views or SVG?Skia gives direct GPU-accelerated rendering with a much richer drawing API (custom shaders, complex paths, filters, blur effects) than standard RN views or react-native-svg can offer, closing the gap with native graphics performance.
Can I animate graphics with Reanimated?Yes, the library is designed to integrate tightly with react-native-reanimated, letting you drive Skia drawings with shared values and worklets for smooth, native-thread animations.
Creator
wcandillon
Size
343.7 MB
Stars
8.8K
Age
5y
Commits · 90 Days