Brings React Native components and APIs to the web in a way that works alongside React DOM. Install via npm and use familiar React Native patterns in browser apps.
Overview
React Native for Web is an accessible port of React Native’s components and APIs that interoperates with React DOM. It targets developers who want one component model across native and browser targets without abandoning existing web React code.
The implementation emphasizes accessible HTML, including semantic tags and support for varied devices and input modes. Interaction handling covers gestures and multiple input modes such as touch, mouse, and keyboard.
Styling uses scoped rules with automatic vendor prefixing and supports right-to-left layouts. Layout can respond to element resize events through responsive containers.
Teams can adopt it incrementally alongside existing React DOM components and include only the pieces they need in the bundle. A browser-based template on CodeSandbox lets you try it without a local setup.
The project sits behind web support in multi-platform React ecosystems such as Expo, React Native Elements, React Native Paper, and NativeBase.
Key features
- Accessible HTML and semantic tags
- Gestures and multi-input interaction
- Scoped styles with vendor prefixing
- RTL layout support
- Element-resize responsive containers
- Interop with existing React DOM code
- Incremental bundling of components
- CodeSandbox browser template
Use cases
- Shared UI across web and native
- Web builds with Expo and similar stacks
- Gradual migration of React web apps
- Cross-platform component libraries
- Prototyping in the browser