Getting Started
インストール手順とフル マークダウン ガイドが含まれたセットアップ プログラムをコピーしてください。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-navigation-bar`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/navigation-bar/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクション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-barbunx cap syncインポート
インポートimport { NavigationBar } from '@capgo/capacitor-navigation-bar';API オーバービュー
API オーバービューsetNavigationBarColor
セクション「setNavigationBarColor」ナビゲーションバーの色とボタンのテーマを設定
import { NavigationBar } from '@capgo/capacitor-navigation-bar';
// Set to white with dark buttonsawait NavigationBar.setNavigationBarColor({ color: NavigationBarColor.WHITE, darkButtons: true});
// Set to custom colorawait NavigationBar.setNavigationBarColor({ color: '#FF5733', darkButtons: false});
// Set a custom divider color on Android 9+await NavigationBar.setNavigationBarColor({ color: NavigationBarColor.WHITE, darkButtons: true, dividerColor: '#D9D9D9'});getNavigationBarColor
セクション「getNavigationBarColor」現在のナビゲーションバーの色とボタンのテーマを取得
import { NavigationBar } from '@capgo/capacitor-navigation-bar';
const { color, darkButtons } = await NavigationBar.getNavigationBarColor();console.log('Current color:', color);console.log('Using dark buttons:', darkButtons);型の参照
種類の参照NavigationBarColor
ナビゲーションバーの色事前定義されたナビゲーションバーの色
export enum NavigationBarColor { /** White color */ WHITE = '#FFFFFF', /** Black color */ BLACK = '#000000', /** Transparent color */ TRANSPARENT = 'transparent',}真実の源
種類の参照このページはプラグインの src/definitions.tsパブリック API がアップストリームで変更された場合に再度 Sync を実行してください。
Getting Started から続けて
種類の参照Capgo を使用している場合 Getting Started nativeメディアとインターフェイスの動作を計画し、 @capgo/capacitor-ナビゲーションバーを使用 native機能のための@capgo/capacitor-ナビゲーションバーの使用 @capgo/capacitor-ライブアクティビティ native機能のための@capgo/capacitor-ライブアクティビティの使用 @capgo/capacitor-ライブアクティビティ @capgo/capacitor-ライブアクティビティの実装詳細 @capgo/capacitor-ビデオプレーヤー native機能のための@capgo/capacitor-ビデオプレーヤーの使用 @capgo/capacitor-ビデオプレーヤー @capgo/capacitor-ビデオプレーヤーの実装詳細