Getting Started
Ce contenu n'est pas encore disponible dans votre langue.
Install
Section titled “Install”bun add @capgo/capacitor-navigation-barbunx cap syncImport
Section titled “Import”import { NavigationBar } from '@capgo/capacitor-navigation-bar';API Overview
Section titled “API Overview”setNavigationBarColor
Section titled “setNavigationBarColor”Set the navigation bar color and button theme.
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
Section titled “getNavigationBarColor”Get the current navigation bar color and button theme.
import { NavigationBar } from '@capgo/capacitor-navigation-bar';
const { color, darkButtons } = await NavigationBar.getNavigationBarColor();console.log('Current color:', color);console.log('Using dark buttons:', darkButtons);Type Reference
Section titled “Type Reference”NavigationBarColor
Section titled “NavigationBarColor”Predefined navigation bar colors.
export enum NavigationBarColor { /** White color */ WHITE = '#FFFFFF', /** Black color */ BLACK = '#000000', /** Transparent color */ TRANSPARENT = 'transparent',}Source Of Truth
Section titled “Source Of Truth”This page is generated from the plugin’s src/definitions.ts. Re-run the sync when the public API changes upstream.