Component to control the app status bar.
It is possible to have multiple StatusBar
components mounted at the same
time. The props will be merged in the order the StatusBar
components were
mounted. One use case is to specify status bar styles per route using Navigator
.
For cases where using a component is not ideal, there is also an imperative API exposed as static functions on the component. It is however not recommended to use the static API and the component for the same prop because any value set by the static API will get overriden by the one set by the component in the next render.
currentHeight
(Android only) The height of the status bar.
If the transition between status bar property changes should be animated. Supported for backgroundColor, barStyle and hidden.
Sets the color of the status bar text.
If the status bar is hidden.
The background color of the status bar.
If the status bar is translucent. When translucent is set to true, the app will draw under the status bar. This is useful when using a semi transparent status bar color.
If the network activity indicator should be visible.
The transition effect when showing and hiding the status bar using the hidden
prop. Defaults to 'fade'.
Show or hide the status bar
Name and Type | Description |
---|---|
hidden boolean | Hide the status bar. |
[animation] | Optional animation when changing the status bar hidden property. |
Set the status bar style
Name and Type | Description |
---|---|
style | Status bar style to set |
[animated] boolean | Animate the style change. |
Control the visibility of the network activity indicator
Name and Type | Description |
---|---|
visible boolean | Show the indicator. |
Set the background color for the status bar
Name and Type | Description |
---|---|
color string | Background color. |
[animated] boolean | Animate the style change. |
Control the translucency of the status bar
Name and Type | Description |
---|---|
translucent boolean | Set as translucent. |
Status bar style
Value | Description |
---|---|
default | Default status bar style (dark for iOS, light for Android) |
light-content | Dark background, white texts and icons |
dark-content | Light background, dark texts and icons |
Status bar animation
Value | Description |
---|---|
none | No animation |
fade | Fade animation |
slide | Slide animation |
Improve this page by sending a pull request!