expo-status-bar
Version: 55.0.3 Provides the same interface as React Native’s StatusBar API, but with better defaults for Expo environments and automatic edge-to-edge support.Installation
Usage
API Reference
StatusBar Component
Sets the color scheme of the status bar
auto: Automatically picks based on app color schemeinverted: Opposite of the app color schemelight: White text/icons (for dark backgrounds)dark: Dark text/icons (for light backgrounds)
Android only: Background color of the status bar
Android only: Makes status bar translucent
Hides the status bar
iOS only: Shows network activity indicator
Animates status bar changes
Imperative API
Sets the status bar style imperatively
Android only: Sets status bar background color
Shows or hides the status bar
Android only: Sets status bar translucency
iOS only: Shows/hides network activity indicator
Examples
Basic Usage
Auto Style Based on Theme
Screen-Specific Status Bar
Android Translucent Status Bar
Hide Status Bar
Network Activity Indicator (iOS)
Imperative Control
With React Navigation
Conditional Styling
TypeScript
Platform Support
| Platform | Supported |
|---|---|
| iOS | ✅ |
| Android | ✅ |
| Web | ❌ |
Differences from React Native StatusBar
- Better Defaults:
style="auto"automatically adapts to color scheme - Edge-to-Edge Support: Works correctly with Android edge-to-edge mode
- Simplified API: Easier to use in Expo projects
- TypeScript: Better type definitions
Best Practices
- Use “auto” Style: Let the component automatically adapt to theme
- One Per Screen: Place one
<StatusBar />per screen/route - Match Background: Status bar style should match screen background
- Test Both Themes: Test your app in both light and dark modes
- Consider Safe Area: Use with
react-native-safe-area-contextfor proper spacing