Skip to main content
Version: v1.x

Web Support

Drax works on the web via React Native Web (and Expo). The same code runs on iOS, Android, and web browsers.

Platform Differences

AspectNative (iOS/Android)Web
Gesture systemNative gesture recognizersPointer events
MeasurementsFabric measureLayout (synchronous)getBoundingClientRect
Scroll handlingContent-relative positionsVisual positions (needs scroll adjustment)
PerformanceUI-thread workletsMain thread (no worker offloading)

Setup with Expo

If you're using Expo, web support works out of the box:

npx expo start --web

Make sure both Reanimated and Gesture Handler are configured for web in your babel.config.js.

Known Limitations

  • No UI-thread hit-testing on web — the spatial index worklet runs on the main thread
  • Touch vs pointer events — mouse drag works, but touch events on mobile browsers may differ from native gesture behavior
  • Measurement timingmeasureLayout returns visual positions on web (not content-relative like Fabric), so scroll offset adjustments are applied automatically

Testing

The example app includes web support. Run it to verify your setup:

cd example && npx expo start --web

Next Steps