{"id":22873405,"url":"https://github.com/hudl/react-native-system-bars","last_synced_at":"2025-05-06T18:15:03.884Z","repository":{"id":47331882,"uuid":"401740334","full_name":"hudl/react-native-system-bars","owner":"hudl","description":"Control the visibility of Android's Status Bar and Navigation Bar","archived":false,"fork":false,"pushed_at":"2022-09-29T07:14:44.000Z","size":798,"stargazers_count":39,"open_issues_count":0,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-29T06:36:27.445Z","etag":null,"topics":["android","navigation-bar","react-native","status-bar"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hudl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-08-31T14:48:41.000Z","updated_at":"2024-09-20T10:01:18.000Z","dependencies_parsed_at":"2022-07-20T17:18:58.827Z","dependency_job_id":null,"html_url":"https://github.com/hudl/react-native-system-bars","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudl%2Freact-native-system-bars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudl%2Freact-native-system-bars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudl%2Freact-native-system-bars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hudl%2Freact-native-system-bars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hudl","download_url":"https://codeload.github.com/hudl/react-native-system-bars/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251720771,"owners_count":21632734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","navigation-bar","react-native","status-bar"],"created_at":"2024-12-13T14:18:47.528Z","updated_at":"2025-05-06T18:15:03.864Z","avatar_url":"https://github.com/hudl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Android System Bars\n\n[![CircleCI](https://circleci.com/gh/hudl/react-native-system-bars/tree/main.svg?style=svg)](https://circleci.com/gh/hudl/react-native-system-bars/tree/main) [![npm version](https://badge.fury.io/js/react-native-system-bars.svg)](https://badge.fury.io/js/react-native-system-bars)\n\nControl the visibility of Android's Status and Navigation Bars.\n\nA lightweight implementation that exposes [Android's system UI visibility API](https://developer.android.com/training/system-ui) to the JS layer. \n\n\u003e Note, this package is for **Android only** and its API will silently do nothing when called on iOS.\n\n## Installation\n\n```sh\nyarn add react-native-system-bars\n```\n\n## Usage\n\n### Setting Android's system UI visibility flags directly\n\n```typescript\nimport AndroidSystemBars from \"react-native-system-bars\";\n\n// Go immersive (i.e. hide status bar and nav bar)\nAndroidSystemBars.setSystemUIVisibility(\n    'SYSTEM_UI_FLAG_IMMERSIVE',\n    'SYSTEM_UI_FLAG_FULLSCREEN',\n    'SYSTEM_UI_FLAG_HIDE_NAVIGATION'\n);\n\n// Show status bar and nav bar\nAndroidSystemBars.setSystemUIVisibility('SYSTEM_UI_FLAG_VISIBLE');\n```\n\n### Utility functions\n\nWe've went through the [Android docs](https://developer.android.com/training/system-ui) for managing the visibility of system bars, and came up with a set of utility functions that you can use. \n\n\u003e If a utility function doesn't exist for your use case, just use the `AndroidSystemBars.setSystemUIVisibility()` function, passing whatever combination of flags you need.\n\n```typescript\nAndroidSystemBars.clearFlags();\n\nAndroidSystemBars.setContentBehindSystemBars();\n\nAndroidSystemBars.dimSystemBars();\n\nAndroidSystemBars.hideStatusBar();\n\nAndroidSystemBars.hideNavigationBar();\n\nAndroidSystemBars.hideStatusAndNavigationBars();\n\nAndroidSystemBars.enableFullScreenMode('immersive', /*preventResizing (optional)*/true);\n\nAndroidSystemBars.enableFullScreenMode('sticky-immersive', /*preventResizing (optional)*/true);\n\nAndroidSystemBars.enableFullScreenMode('lean-back', /*preventResizing (optional)*/true);\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudl%2Freact-native-system-bars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhudl%2Freact-native-system-bars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhudl%2Freact-native-system-bars/lists"}