An open API service indexing awesome lists of open source software.

https://github.com/cap-go/capacitor-navigation-bar

Capacitor plugin Set navigation bar color for android lolipop and higher
https://github.com/cap-go/capacitor-navigation-bar

capacitor capacitor-plugin plugin

Last synced: about 1 month ago
JSON representation

Capacitor plugin Set navigation bar color for android lolipop and higher

Awesome Lists containing this project

README

          

Capgo - Instant updates for Capacitor


➡️ Get Instant updates for your App with Capgo


Missing a feature? We’ll build the plugin for you 💪


# capacitor-navigation-bar

Set navigation bar color for android lollipop and higher

## Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/navigation-bar/

## Compatibility

| Plugin version | Capacitor compatibility | Maintained |
| -------------- | ----------------------- | ---------- |
| v8.\*.\* | v8.\*.\* | ✅ |
| v7.\*.\* | v7.\*.\* | On demand |
| v6.\*.\* | v6.\*.\* | ❌ |
| v5.\*.\* | v5.\*.\* | ❌ |

> **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.

## Install

```bash
npm install @capgo/capacitor-navigation-bar
npx cap sync
```

## Example Apps

- `example-app`: Interactive showcase that exercises all plugin options (color presets, custom hex, dark buttons, state reading).

## API

* [`setNavigationBarColor(...)`](#setnavigationbarcolor)
* [`getNavigationBarColor()`](#getnavigationbarcolor)
* [`getPluginVersion()`](#getpluginversion)
* [Enums](#enums)

Capacitor Navigation Bar Plugin for customizing the Android navigation bar.

### setNavigationBarColor(...)

```typescript
setNavigationBarColor(options: { color: NavigationBarColor | string; darkButtons?: boolean; dividerColor?: NavigationBarColor | string; }) => Promise
```

Set the navigation bar color and button theme.

| Param | Type | Description |
| ------------- | ----------------------------------------------------------------------------- | --------------------------------------------- |
| **`options`** | { color: string; darkButtons?: boolean; dividerColor?: string; } | - Configuration for navigation bar appearance |

**Since:** 1.0.0

--------------------

### getNavigationBarColor()

```typescript
getNavigationBarColor() => Promise<{ color: string; darkButtons: boolean; }>
```

Get the current navigation bar color and button theme.

**Returns:** Promise<{ color: string; darkButtons: boolean; }>

**Since:** 1.0.0

--------------------

### getPluginVersion()

```typescript
getPluginVersion() => Promise<{ version: string; }>
```

Get the native Capacitor plugin version.

**Returns:** Promise<{ version: string; }>

**Since:** 1.0.0

--------------------

### Enums

#### NavigationBarColor

| Members | Value | Description |
| ----------------- | -------------------------- | ----------------- |
| **`WHITE`** | '#FFFFFF' | White color |
| **`BLACK`** | '#000000' | Black color |
| **`TRANSPARENT`** | 'transparent' | Transparent color |