@hugotomazi/capacitor-navigation-bar
Capacitor plugin for Navigation Bar manipulation.
Maintainer | GitHub | Social |
---|---|---|
Hugo Tomazi | hugotomazi | @hugotomazi |
npm install @hugotomazi/capacitor-navigation-bar
npx cap sync
No configuration required for this plugin.
show()
hide()
setColor(...)
setTransparency(...)
getColor()
addListener(...)
addListener(...)
addListener(...)
- Interfaces
- Enums
show() => Promise<void>
Display the navigation bar.
hide() => Promise<void>
Hide the navigation bar.
setColor(options: ColorParameters) => Promise<void>
Change the color of the navigation bar. *Support alpha hexadecimal numbers.
Param | Type |
---|---|
options |
ColorParameters |
setTransparency(options: { isTransparent: boolean; }) => Promise<void>
Set the Transparency
Param | Type |
---|---|
options |
{ isTransparent: boolean; } |
getColor() => Promise<{ color: string; }>
Gets the current color of the navigation bar in Hexadecimal.
Returns: Promise<{ color: string; }>
addListener(event: NavigationBarPluginEvents.SHOW, listenerFunc: () => void) => PluginListenerHandle
Event fired after navigation bar is displayed
Param | Type | Description |
---|---|---|
event |
NavigationBarPluginEvents.SHOW |
The event |
listenerFunc |
() => void |
Callback |
Returns: PluginListenerHandle
addListener(event: NavigationBarPluginEvents.HIDE, listenerFunc: () => void) => PluginListenerHandle
Event fired after navigation bar is hidden
Param | Type | Description |
---|---|---|
event |
NavigationBarPluginEvents.HIDE |
The event |
listenerFunc |
() => void |
Callback |
Returns: PluginListenerHandle
addListener(event: NavigationBarPluginEvents.COLOR_CHANGE, listenerFunc: (returnObject: { color: string; }) => void) => PluginListenerHandle
Event fired after navigation bar color is changed
Param | Type | Description |
---|---|---|
event |
NavigationBarPluginEvents.COLOR_CHANGE |
The event |
listenerFunc |
(returnObject: { color: string; }) => void |
Callback |
Returns: PluginListenerHandle
Prop | Type | Description |
---|---|---|
color |
string |
Sets the new color of the navigation bar. |
darkButtons |
boolean |
Sets whether the default navigation bar buttons should be black or white. |
Prop | Type |
---|---|
remove |
() => Promise<void> |
Members | Value | Description |
---|---|---|
SHOW |
'onShow' |
Called after the navigation bar is displayed |
HIDE |
'onHide' |
Called after navigation bar is hidden |
COLOR_CHANGE |
'onColorChange' |
Called after navigation bar color is changed |