Main Configuration Features
On-Device Backgrounds
Enable the built-in on-device backgrounds addon panel..rnstorybook/main.ts
Enable the on-device backgrounds addon.When enabled, stories can configure background colors through the
backgrounds parameter, and users can switch between them in the Storybook UI.Button.stories.tsx
This feature requires no additional package installation. It’s built into the core package.
React Native Options
Configure React Native-specific runtime behavior..rnstorybook/main.ts
Whether to enable play functions in stories.Play functions are not yet fully supported on React Native. This is a future option for when support is added.
Metro Configuration Features
Lite Mode
Reduce bundle size by mocking out the full Storybook UI.metro.config.js
Mock out the default Storybook UI to avoid installing heavy dependencies like:
react-native-reanimatedreact-native-gesture-handlerreact-native-safe-area-context@gorhom/bottom-sheet
Lite mode significantly reduces bundle size if you don’t need the full on-device UI.
Experimental MCP
Enable Model Context Protocol support for AI agent integration.metro.config.js
Enable MCP (Model Context Protocol) server support.Adds an The MCP server runs on the same port as the channel server (default 7007) and provides endpoints for AI tools to interact with your Storybook.
/mcp HTTP endpoint to the channel server, allowing AI agents like Claude Code or Cursor to:- Query component documentation
- Browse available stories
- Navigate to specific stories (requires WebSockets)
Global Feature Flags
Storybook automatically disables certain web-only features on React Native:These are internal flags and cannot be configured directly. Use the on-device equivalents like
ondeviceBackgrounds instead.Environment Variables
Disable Telemetry
Storybook collects anonymous usage data to improve the project. Disable telemetry:Conditional Storybook
Use environment variables to conditionally enable/disable Storybook:metro.config.js
Examples
All Features Enabled
.rnstorybook/main.ts
metro.config.js
Minimal Configuration
.rnstorybook/main.ts
metro.config.js
Feature Support Matrix
| Feature | Status | Package |
|---|---|---|
| On-device Backgrounds | Stable | Core |
| On-device Controls | Stable | @storybook/addon-ondevice-controls |
| On-device Actions | Stable | @storybook/addon-ondevice-actions |
| On-device Notes | Stable | @storybook/addon-ondevice-notes |
| WebSockets | Stable | Core |
| Lite Mode | Stable | Core |
| Play Functions | Experimental | Core |
| MCP Server | Experimental | Core |
| Interactions | Not supported | - |
| Viewport | Not supported | - |
| Measure | Not supported | - |
Web addons like
@storybook/addon-backgrounds are not compatible with React Native. Use the on-device equivalents instead.