# azir-theme

> A powerfull tool to customize React native app theme, components,style,....

Latest version **1.0.9** (published 2019-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install azir-theme
pnpm add azir-theme
yarn add azir-theme
bun add azir-theme
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2019-12-18 |
| First published | 2019-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Abed Allateef Qaisi abed_q@hotmail.com |
| Maintainers | lockcommerce |
| Keywords | react-native, react-component, react-native-component, react, react native, mobile, ios, android, ui, expo, blue eye, Theme, framework, advance theme, native theme, react native theme, expo theme |

## Links

- npm: https://www.npmjs.com/package/azir-theme
- Repository: https://github.com/abodehq/azir
- Homepage: https://azir.io/
- Issues: https://github.com/abodehq/azir/issues
- npm.io page: https://npm.io/package/azir-theme

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2019-12-18
- 1.0.8 — 2019-10-11
- 1.0.7 — 2019-10-11
- 1.0.6 — 2019-09-28
- 1.0.5 — 2019-09-24
- 1.0.4 — 2019-09-22
- 1.0.3 — 2019-09-18
- 1.0.2 — 2019-09-17
- 1.0.1 — 2019-09-17
- 1.0.0 — 2019-09-17

## README

# Azir Framwork list :  [https://azir.io/docs](https://azir.io/docs)

# AzirTheme usage

All the colors, sizes and layout rules are stored in our default theme. Every component inherits its styling rules from this Package. Imagine this... You're building an application and you have 30 buttons using the primary color but you feel like that color doesn't really suit your project. You can re-write our theme file with only the things you want to change by using our theme components and all Azir components will change the that certain style.

>We use Galio Framework as a base of our framework . 

### 1. Components

- **AzirTheme**: default theme for components exporting an object with `{ COLORS, SIZES }` the origion settings.
- **withAzir**: HoC for any React-Native component with args: `Component` and optional `styles`. By using this, you can access constants we have in our default theme.
- **AzirProvider**: React Context Provider getting **custom theme** from props and pass it to the React Context.

### 2. Usage

- install any of our available components .
- import { **theme, withAzir, AzirProvider** } from 'azir-theme'
- export default **withAzir(YourComponent, componentStyles)**;
- custom theme constants will **overwrite** the default Azir theme constants

```js
const customTheme = {
  SIZES: { FONT: 120, BASE: 18, BORDER_RADIUS: 0, HR_PADDING: 0 },
  // this will overwrite the Azir SIZES BASE value 16
  COLORS: { THEME: "#ff9900" }
  // this will overwrite the Azir COLORS PRIMARY color #B23AFC
};
<AzirProvider theme={customTheme}>
  <YourRootComponent />
</AzirProvider>;
```

#### 2.1 withAzir in-depth usage and explanation

Exporting a React class/function using our withAzir function enables your component to consume Azir's React Context and pass down theme in your component as a prop or as an argument for `styles`. So now you can use our constant colors and sizes in your own components/screens.

```js
const styles = theme =>
  StyleSheet.create({
    container: {
      flex: 1,
      backgroundColor: theme.COLORS.FACEBOOK
    }
  });
export default withAzir(youComponent, styles);
```

### 3. Theme COLORS & SIZES

Use the following reference tables to create your own custom theme

#### COLORS reference table

| **Color name** | **Default value**       | **Description**                                                                               |
| :------------- | :---------------------- | :-------------------------------------------------------------------------------------------- |
| **SOCIAL**     |
| FACEBOOK       | #3B5998                 | ![](https://dummyimage.com/40x12/3B5998/000000.png&text=+) For social Facebook button         |
| TWITTER        | #5BC0DE                 | ![](https://dummyimage.com/40x12/5BC0DE/000000.png&text=+) For social Twitter button          |
| DRIBBBLE       | #EA4C89                 | ![](https://dummyimage.com/40x12/EA4C89/000000.png&text=+) For social Dribble button          |
| **Azir**       |
| THEME          | #B23AFC                 | ![](https://dummyimage.com/40x12/B23AFC/000000.png&text=+) Theme default color                |
| PRIMARY        | #B23AFC                 | ![](https://dummyimage.com/40x12/B23AFC/000000.png&text=+) Primary color for Buttons          |
| INFO           | #1232FF                 | ![](https://dummyimage.com/40x12/1232FF/000000.png&text=+) Info color for Buttons & Text      |
| ERROR          | #FE2472                 | ![](https://dummyimage.com/40x12/FE2472/000000.png&text=+) Info color for error messages      |
| WARNING        | #FF9C09                 | ![](https://dummyimage.com/40x12/FF9C09/000000.png&text=+) Warning color for warning messages |
| SUCCESS        | #45DF31                 | ![](https://dummyimage.com/40x12/45DF31/000000.png&text=+) Success color for success messages |
| **COMPONENTS** |
| INPUT          | #808080                 | ![](https://dummyimage.com/40x12/808080/000000.png&text=+) Input backgroundColor              |
| PLACEHOLDER    | #9FA5AA                 | ![](https://dummyimage.com/40x12/9FA5AA/000000.png&text=+) Input placeholder text color       |
| NAVBAR         | #F9F9F9                 | ![](https://dummyimage.com/40x12/F9F9F9/000000.png&text=+) NavBar text color                  |
| BLOCK          | #808080                 | ![](https://dummyimage.com/40x12/808080/000000.png&text=+) Block border color                 |
| ICON           | #000000                 | ![](https://dummyimage.com/40x12/000000/000000.png&text=+) Icon default color                 |
| **STANDARD**   |
| WHITE          | #FFFFFF                 | ![](https://dummyimage.com/40x12/FFFFFF/000000.png&text=+) White color                        |
| BLACK          | #000000                 | ![](https://dummyimage.com/40x12/000000/000000.png&text=+) Black color                        |
| GREY           | #898989                 | ![](https://dummyimage.com/40x12/898989/000000.png&text=+) Grey color                         |
| MUTED          | #9FA5AA                 | ![](https://dummyimage.com/40x12/9FA5AA/000000.png&text=+) Text muted color                   |
| TRANSPARENT    | transparent             | Transparent value for Block, Button and other components                                      |
| NEUTRAL        | rgba(255,255,255, 0.65) | Text neutral color white with 65% transparency                                                |

#### SIZES reference table

`const { height, width } = Dimensions.get('screen');`
By default the size of **16** is used to calculate all the sizes

| **Size name**        | **Default value** |
| :------------------- | :---------------: |
| **THEME**            |
| BASE                 |        16         |
| FONT                 |        16         |
| ICON                 |        16         |
| OPACITY              |        0.8        |
| BORDER_RADIUS        |         0         |
| BORDER_WIDTH         |         0         |
| **ICON**             |
| ICON_SIZE            |      16 \* 9      |
| **BUTTON**           |
| BUTTON_WIDTH         |      16 \* 9      |
| BUTTON_HEIGHT        |    16 \* 2.75     |
| BUTTON_SHADOW_RADIUS |        10         |

---
_Source: https://npm.io/package/azir-theme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
