# @os-design-mobile/theming

Latest version **1.0.56** (published 2025-03-04) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @os-design-mobile/theming
pnpm add @os-design-mobile/theming
yarn add @os-design-mobile/theming
bun add @os-design-mobile/theming
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.56 |
| Published | 2025-03-04 |
| First published | 2021-04-09 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 59.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | oxilor |

## Links

- npm: https://www.npmjs.com/package/@os-design-mobile/theming
- Repository: git@gitlab.com:os-team/libs/os-design.git
- npm.io page: https://npm.io/package/@os-design-mobile/theming

## Dependencies (1)

- [@os-design/theming-tools](https://npm.io/package/@os-design/theming-tools.md) ^1.0.31

## Recent versions

- 1.0.56 (latest) — 2025-03-04
- 1.0.55 — 2024-12-08
- 1.0.54 — 2024-12-07
- 1.0.53 — 2024-12-07
- 1.0.52 — 2024-11-30
- 1.0.51 — 2024-11-26
- 1.0.50 — 2024-11-24
- 1.0.49 — 2024-11-24
- 1.0.48 — 2024-11-24
- 1.0.47 — 2024-11-21
- 1.0.46 — 2024-11-20
- 1.0.45 — 2024-11-20
- 1.0.44 — 2024-11-19
- 1.0.43 — 2024-06-03
- 1.0.42 — 2024-05-25
- … 42 more at https://npm.io/package/@os-design-mobile/theming/versions

## README

# @os-design-mobile/theming [![NPM version](https://img.shields.io/npm/v/@os-design-mobile/theming)](https://yarnpkg.com/package/@os-design-mobile/theming) [![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@os-design-mobile/theming)](https://bundlephobia.com/result?p=@os-design-mobile/theming)

Before you start using the os-design-mobile components, you need to add the ThemeProvider that will apply the theme to all the components used.

## Installation

### Step 1. Install the package

Install the package using the following command:

```
yarn add @os-design-mobile/theming
```

Also make sure that you have the [@emotion/native](https://emotion.sh/docs/@emotion/native) and [@react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage) packages installed.

### Step 2. Redefine the emotion theme

Create the `emotion.d.ts` file with the following content:

```ts
import '@emotion/react';
import { Theme as BaseTheme } from '@os-design-mobile/theming';

declare module '@emotion/react' {
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
  export interface Theme extends BaseTheme {}
}
```

### Step 3. Wrap your app in `ThemeProvider`

For example:

```tsx
import React from 'react';
import { ThemeProvider } from '@os-design-mobile/theming';
import AppNavigator from './AppNavigator';

const App: React.FC = () => (
  <ThemeProvider>
    <AppNavigator />
  </ThemeProvider>
);

export default App;
```

---

See all theming features in the [os-design's Storybook](https://os-team.gitlab.io/libs/os-design/?path=/story/theming--page).

---
_Source: https://npm.io/package/@os-design-mobile/theming · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
