メインコンテンツにジャンプ

Getting Started

GitHub

CapgoのAIアシストセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。

ターミナル画面
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

次に、以下のプロンプトを使用してください。

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-navigation-bar` plugin in my project.

Manualセットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。

ターミナル画面
bun add @capgo/capacitor-navigation-bar
bunx cap sync
import { NavigationBar } from '@capgo/capacitor-navigation-bar';

ナビゲーションバーの色とボタンのテーマを設定します。

import { NavigationBar } from '@capgo/capacitor-navigation-bar';
// Set to white with dark buttons
await NavigationBar.setNavigationBarColor({
color: NavigationBarColor.WHITE,
darkButtons: true
});
// Set to custom color
await NavigationBar.setNavigationBarColor({
color: '#FF5733',
darkButtons: false
});
// Set a custom divider color on Android 9+
await NavigationBar.setNavigationBarColor({
color: NavigationBarColor.WHITE,
darkButtons: true,
dividerColor: '#D9D9D9'
});

現在のナビゲーションバーの色とボタンのテーマを取得します。

import { NavigationBar } from '@capgo/capacitor-navigation-bar';
const { color, darkButtons } = await NavigationBar.getNavigationBarColor();
console.log('Current color:', color);
console.log('Using dark buttons:', darkButtons);

型の参照

種類の参照

事前定義されたナビゲーションバーの色

export enum NavigationBarColor {
/** White color */
WHITE = '#FFFFFF',
/** Black color */
BLACK = '#000000',
/** Transparent color */
TRANSPARENT = 'transparent',
}

真実の源

種類の参照

このページはプラグインの src/definitions.tsAPIがアップストリームで変更された場合に再度Syncを実行してください。

Getting Startedから続けて

種類の参照

Capgoを使用している場合 Getting Started To plan native media and interface behavior, connect it with Using @capgo/capacitor-バーターコンターバームナート For the native capability in Using @capgo/capacitor-バーターコンターバームナート, Using @capgo/capacitor-コンターメストバーターコンターバームナート For the native capability in Using @capgo/capacitor-コンターメストバーターコンターバームナート, @capgo/capacitor-コンターメストバーターコンターバームナート For the implementation detail in @capgo/capacitor-コンターメストバーターコンターバームナート, Using @capgo/capacitor-コイバロストバーターコンターバームナート For the native capability in Using @capgo/capacitor-コイバロストバーターコンターバームナート, and @capgo/capacitor-コイバロストバーターコンターバームナート For the implementation detail in @capgo/capacitor-コイバロストバーターコンターバームナート.