1.0.1 • Published 6 years ago

nativescript-nbmaterial-bottomnav v1.0.1

Weekly downloads
2
License
Apache-2.0
Repository
-
Last release
6 years ago

Nativescript implementation of the Material Bottom Navigation

The module implement Bottom Navigation Layout on both iOS and Android.
You can add a shit animation to nav items by adding "shifted" class to the component. Icon and Title extends nativescript Label. You can use a font library like material-icons or font-awesome.

If you want to use it as a root navigator your app.ts must looks like:

import "./bundle-config";
import {startWithMenu} from 'nativescript-nbmaterial-bottomnav';

startWithMenu({ moduleName: 'home/home-page' }, "menu/menu-page");

"moduleName" is your first screen.

And menu-page looks like:

<Page xmlns="http://schemas.nativescript.org/tns.xsd" 
xmlns:bnav="nativescript-nbmaterial-bottomnav">
	<bnav:BottomNavigation autoselect="false" select="selectNav" id="bottomnav" class="shifted">
		<bnav:BottomNavigationItem>
			<bnav:Icon text="dashboard"  />
			<bnav:Title text="Home"/>
		</bnav:BottomNavigationItem>
		<bnav:BottomNavigationItem>
			<bnav:Icon text="add"/>
			<bnav:Title text="Ajouter" />
		</bnav:BottomNavigationItem>
		<bnav:BottomNavigationItem>
			<bnav:Icon text="favorite"/>
			<bnav:Title text="Consulter" />
		</bnav:BottomNavigationItem> 
	</bnav:BottomNavigation>  
</Page>

}

See all modules here