
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
nativescript-bottombar
Advanced tools
NativeScript plugin for AHBottomNavigation and MiniTabBar.
Checkout demo.
2.x: tns plugin add nativescript-bottombar@^2.1
3.x: tns plugin add nativescript-bottombar
<GridLayout rows="*, auto">
<StackLayout row="0" orientation="vertical">
<Label text="demo"></Label>
</StackLayout>
<BottomBar row="1" [items]="items" [hide]="hidden" [titleState]="titleState" (loaded)="tabLoaded($event)" (tabSelected)="tabSelected($event)" [inactiveColor]="inactiveColor" [accentColor]="accentColor" colored="true"></BottomBar>
</GridLayout>
import { Component } from "@angular/core";
import { registerElement } from 'nativescript-angular';
import { BottomBar, BottomBarItem, TITLE_STATE, SelectedIndexChangedEventData, Notification } from 'nativescript-bottombar';
registerElement('BottomBar', () => BottomBar);
@Component({
selector: "nsapp",
templateUrl: "app.component.html",
})
export class AppComponent {
public hidden: boolean;
public titleState: TITLE_STATE;
public _bar: BottomBar;
public inactiveColor: string;
public accentColor: string;
public items: Array<BottomBarItem> = [
new BottomBarItem(0, "Home", "ic_home_black_24dp", "black", new Notification("blue", "white", "1")),
new BottomBarItem(1, "Calendar", "ic_calendar", "#1083BF", new Notification("green", "blue", "1")),
new BottomBarItem(2, "Profile", "ic_collaborator", "pink", new Notification("pink", "yellow", "1")),
new BottomBarItem(3, "Message", "ic_paperplane", "green", new Notification("green", "red", "1"))
];
tabLoaded(event) {
this._bar = <BottomBar>event.object;
this.hidden = false;
this.titleState = TITLE_STATE.SHOW_WHEN_ACTIVE;
this.inactiveColor = "white";
this.accentColor = "blue";
}
tabSelected(args: SelectedIndexChangedEventData) {
// only triggered when a different tab is tapped
console.log(args.newIndex);
}
}
Don't forget that you need your icons files to be in your ressources folder as follow:
iOS | Android |
---|---|
![]() | ![]() |
FAQs
NativeScript plugin for AHBottomNavigation.
The npm package nativescript-bottombar receives a total of 38 weekly downloads. As such, nativescript-bottombar popularity was classified as not popular.
We found that nativescript-bottombar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.