Thanks to its offscreen capabilities, React Native Skia can run on Node.js. This means you can use the Skia API to draw and encode images on the server. By default, drawings execute on the CPU, but GPU acceleration is also possible.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shopify/react-native-skia/llms.txt
Use this file to discover all available pages before exploring further.
Hello World
The import URL looks different for Node programs. You need to use the CommonJS build and import only the APIs that work on Node without React Native dependencies.GPU Acceleration
React Native Skia relies on the OffscreenCanvas API to support GPU-accelerated offscreen surfaces. To benefit from GPU acceleration, provide a polyfill of the OffscreenCanvas API on Node. For example, here’s an OffscreenCanvas polyfill that uses WebGL via headless-gl.Use Cases
- Image generation - Generate charts, graphs, and graphics on the server
- PDF creation - Render complex graphics for PDF documents
- Social media cards - Create dynamic Open Graph images
- Batch processing - Process multiple images efficiently
- Testing - Visual regression testing without a browser