# @bacons/expo-background-color

> Stack based React component for updating the native background color

Latest version **1.0.2** (published 2022-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bacons/expo-background-color
pnpm add @bacons/expo-background-color
yarn add @bacons/expo-background-color
bun add @bacons/expo-background-color
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-05-18 |
| First published | 2022-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Evan Bacon |
| Maintainers | evanbacon |
| Keywords | expo, expo-system-ui, react-native |

## Links

- npm: https://www.npmjs.com/package/@bacons/expo-background-color
- Repository: https://github.com/evanbacon/expo-background-color
- Homepage: https://github.com/evanbacon/expo-background-color#readme
- Issues: https://github.com/evanbacon/expo-background-color/issues
- npm.io page: https://npm.io/package/@bacons/expo-background-color

## Recent versions

- 1.0.2 (latest) — 2022-05-18
- 1.0.1 — 2022-05-18
- 1.0.0 — 2022-05-18

## README

# @bacons/expo-background-color

A stack based Expo component for setting the background color of the root view. Useful for changing the background color on certain screens or inside of native modals. Updates based on `Appearance` and `AppState` native modules.

This is a published version of my [original gist](https://gist.github.com/EvanBacon/d148b2425c5a0bd11b6cecb5f4b72bb8).

## Add the package to your npm dependencies

> Runs in any React Native project. Supports iOS, Android, web.

```
expo add expo-system-ui @bacons/expo-background-color
```

## Usage

Drop the `BackgroundColor` component anywhere, background color respect the component instance at the highest level (i.e. `StatusBar` module in `react-native`).

```tsx
import { BackgroundColor } from "@bacons/expo-background-color";

function App() {
  return (
    <>
      <BackgroundColor color={{ light: "#fff", dark: "#000" }} />
      <BackgroundColor color={"#fff000"} />
    </>
  );
}
```

---
_Source: https://npm.io/package/@bacons/expo-background-color · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
