Installation
Add the dependency:
React Native:
npm i react-native-bottom-menu
Peer Dependencies
IMPORTANT! You need install them.
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
"react-native-androw": ">= 0.0.31",
"react-native-vector-icons": ">= 6.x.x",
"react-native-dynamic-vector-icons": ">= x.x.x"
Basic Usage
You can use any other component rather than Item component. It's all customizable.
;
<BottomMenu> <Item size=22 name="home" text="Home" type="Octicons" onPress= {}) /></BottomMenu>
Advanced Usage
You can check the example for the advanced usage
<BottomMenu> <Item size=22 name="home" text="Home" type="Octicons" isActive=thisstateisActive == "home" ? true : false onPress= this /> <Item size=22 type="Feather" text="Messages" name="message-circle" isActive=thisstateisActive == "messages" ? true : false onPress= this /> <Item size=30 name="cart" text="Cart" type="EvilIcons" isActive=thisstateisActive == "cart" ? true : false onPress= this /> <Item size=22 name="settings" text="Settings" type="SimpleLineIcons" isActive=thisstateisActive == "settings" ? true : false onPress= this /></BottomMenu>
BottomMenu Wrapper with React Hooks as an Example
;; const BottomMenuWrapper = { const isActive setActive = ; return <BottomMenu> <Item size=22 name="home" text="Home" type="Octicons" isActive=isActive == "home" ? true : false onPress= /> <Item size=22 type="Feather" text="Messages" name="message-circle" isActive=isActive == "messages" ? true : false onPress= /> <Item size=30 name="cart" text="Cart" type="EvilIcons" isActive=isActive == "cart" ? true : false onPress= /> <Item size=22 name="settings" text="Settings" type="SimpleLineIcons" isActive=isActive == "settings" ? true : false onPress= /> </BottomMenu> ;}; ;
Usage
; <BottomMenu />
ToDos
- LICENSE
- Write an article about the lib on Medium
Author
FreakyCoder, kurayogun@gmail.com
License
React Native Bottom Menu Library is available under the MIT license. See the LICENSE file for more info.