Skip to content

Add StatusBar "auto" barStyle value#56978

Open
zoontek wants to merge 3 commits into
facebook:mainfrom
zoontek:add-status-bar-auto
Open

Add StatusBar "auto" barStyle value#56978
zoontek wants to merge 3 commits into
facebook:mainfrom
zoontek:add-status-bar-auto

Conversation

@zoontek
Copy link
Copy Markdown
Contributor

@zoontek zoontek commented May 27, 2026

Summary:

Adds support for barStyle="auto" on StatusBar. When set, the bar style is resolved against the current color scheme: light-content in dark mode, dark-content in light mode. The resolution re-runs when the system color scheme changes, while at least one StatusBar is mounted.

The behavior mirrors what expo-status-bar already exposes. The 'auto' name is the one we use at Expo. It is not necessarily the right name for React Native core, happy to switch to something else if reviewers prefer.

Changelog:

[GENERAL] [ADDED] - StatusBar: support barStyle="auto" to follow the current color scheme

Test Plan:

  • yarn jest packages/react-native/Libraries/Components/StatusBar passes, including a new test that asserts setBarStyle('auto') calls the native module with dark-content in light mode and light-content in dark mode.
  • Play with it in the RNTester app

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 27, 2026
@github-actions
Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 27, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 27, 2026

@zeyap has imported this pull request. If you are a Meta employee, you can view this in D106535143.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant