# @react-native-community/toolbar-android

> A React Native Component for Android Toolbar

Latest version **0.2.1** (published 2021-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-native-community/toolbar-android
pnpm add @react-native-community/toolbar-android
yarn add @react-native-community/toolbar-android
bun add @react-native-community/toolbar-android
```

## Health

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

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-09-03 |
| First published | 2020-01-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Connectdotz |
| Maintainers | bartoszklonowski, titozzz, empyrical, react-native-community-bot, grabbou, cpojer, mattoakes, ferrannp, mike866, krizzu, mike.nedosekin, rafaellpa, trensik, dmtr.kovalenko, thymikee, esemesek, nicholaslee119, bartolkaruza, mmazzarolo, rewieer, ansal_ali, charpeni, janicduplessis, satya164, msand, swaagie, kelset, scott.beca, johandutoit, vonovak, wojteg1337, naturalclar, safaiyeh, connectdotz, luancurti, pvinis, brentvatne, evanbacon, trozee, eliwhite, alloy |
| Keywords | toolbar-android, react native, react-native |

## Links

- npm: https://www.npmjs.com/package/@react-native-community/toolbar-android
- Repository: https://github.com/react-native-community/toolbar-android
- Homepage: https://github.com/react-native-community/toolbar-android#readme
- Issues: https://github.com/react-native-community/toolbar-android/issues
- npm.io page: https://npm.io/package/@react-native-community/toolbar-android

## 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

- 0.2.1 (latest) — 2021-09-03
- 0.2.0 — 2021-09-03
- 0.1.0-rc.2 — 2020-03-08
- 0.1.0-rc.1 — 2020-02-02
- 0.1.0-rc.0 — 2020-01-14

## README

# `@react-native-community/toolbar-android`
[![CircleCI](https://circleci.com/gh/react-native-toolbar-android/toolbar-android/tree/master.svg?style=svg)](https://circleci.com/gh/react-native-toolbar-android/toolbar-android/tree/master) ![Supports Android](https://img.shields.io/badge/platforms-android-lightgrey.svg) ![MIT License](https://img.shields.io/npm/l/@react-native-community/toolbar-android.svg) [![npm version](https://img.shields.io/npm/v/@react-native-community/toolbar-android.svg?style=flat)](https://www.npmjs.com/package/@react-native-community/toolbar-android) [![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)

## What is it?
A React component that wraps the Android-only [Toolbar widget](https://developer.android.com/reference/android/widget/Toolbar). 

This is extracted from react-native per [lean core](https://github.com/facebook/react-native/issues/23313) initiative, which removed `ToolbarAndroid` at v0.61. The goal of this repo is to house the original component and continue to improve and maintain a lean wrapper with zero dependency other than react and react-native.


![Alt text](screenShots/ToolbarAndroidExample.png)

## Getting started

`yarn add @react-native-community/toolbar-android`

or

`npm install @react-native-community/toolbar-android --save`

Now link the native code with your project:

```
# RN >= 0.60
npx pod-install

# RN < 0.60
react-native link @react-native-community/toolbar-android
```

### Manual installation

<details>
<summary>Manually link the library on Android</summary>
   
#### `android/settings.gradle`
```groovy
include ':react-native-community-toolbar-android'
project(':react-native-community-toolbar-android').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/toolbar-android/android')
```

#### `android/app/build.gradle`
```groovy
dependencies {
   ...
   implementation project(':react-native-community-toolbar-android')
}
```

#### `android/app/src/main/.../MainApplication.java`
On top, where imports are:

```java
import com.reactnativecommunity.toolbarandroid.ReactToolbarPackage;
```

Add the `toolbar-android` class to your list of exported packages.

```java
@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new ReactToolbarPackage()
    );
}
```
</details>

## Migrating from the core `react-native` module
This module was created when the ToolbarAndroid was split out from the core of React Native. To migrate to this module you need to follow the installation instructions above and then change you imports from:

```javascript
import { ToolbarAndroid } from 'react-native';
```

to:

```javascript
import ToolbarAndroid from '@react-native-community/toolbar-android';
```

## Usage

see [ToolbarAndroid](./doc/toolbarandroid.md)                                                             

## Contributors

This module was extracted from `react-native` core.

## License
The library is released under the MIT licence. For more information see `LICENSE`.

---
_Source: https://npm.io/package/@react-native-community/toolbar-android · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
