https://github.com/sinhapaurush/bottom_tabs
Bottom Tab Navigator in Yugal
https://github.com/sinhapaurush/bottom_tabs
Last synced: 7 months ago
JSON representation
Bottom Tab Navigator in Yugal
- Host: GitHub
- URL: https://github.com/sinhapaurush/bottom_tabs
- Owner: sinhapaurush
- Created: 2022-08-16T18:42:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-16T18:52:04.000Z (over 3 years ago)
- Last Synced: 2025-02-12T07:25:52.839Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Bottom Tabs Navigator
Creates Tab Navigator in Yugal
## How to use this library?
- Render Bottom Tab Navigator as a screen in Yugal, this can be done with Router and as well as yugal.navigate directly. But you have to parse some arguments into it.
- All paramaters must be defined into an object.
### style
Defined css for Bottom Tab Navigator. `string` is accepted.
### tabs
An array of all tabs as objects. Objects must be having `icon`, `label` and destination `screen`.
### hideLabel
If `true`, then label will be hidden in tab navigator.
### initial
Defined initial screen to render into the navigator.
## Example Code
```javascript
window.addEventListener("load", () => {
yugal.navigate(BottomTabNavigator({
style: "background: #fff;",
tabs: [
{
icon: "HOME",
label: "WORLD",
screen: "HomePage()"
},
{
icon: "ABOUT",
label: "IKHKHNI",
screen: "About()"
}
],
hideLabel: true,
initial: ()=>HomePage()
}
));
});
```