Foundation
Main View
Components
Charts
Dialogs
Framer Animations
Forms
Grids
Typography
Tools
Package: @uireact/navbar
Creates a navbar container and provides components to provide styling and coloration based on the theme
1. Make sure you install peer dependencies first:
2. Install package:
npm i -S @uireact/navbar
This example uses framer motion variants to animate the icon when you hover on each navbar item.
<AnimatedNavbarExample />
You can give it a check to this example here.
<UiNavbar orientation="stacked" noBackground appearance="rounded"> <UiNavbarItem> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 1 </a> </UiLink> </UiNavbarItem> <UiNavbarItem> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 2 </a> </UiLink> </UiNavbarItem> <UiNavbarItem active> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 3 </a> </UiLink> </UiNavbarItem> <UiNavbarItem> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 4 </a> </UiLink> </UiNavbarItem> </UiNavbar>
<UiNavbar orientation="inline" stretch noBackground> <UiNavbarItem> <UiText padding={{all: 'four'}}>Option 1</UiText> </UiNavbarItem> <UiNavbarItem> <UiText padding={{all: 'four'}}>Option 2</UiText> </UiNavbarItem> </UiNavbar>
<UiNavbar category="primary" hoverColoration="dark" noBackground> <UiNavbarItem> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 1 </a> </UiLink> </UiNavbarItem> <UiNavbarItem> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 2 </a> </UiLink> </UiNavbarItem> <UiNavbarItem active> <UiLink padding={{all: 'four'}}> <a href="https://uireact.io" target="_blank"> Option 3 </a> </UiLink> </UiNavbarItem> </UiNavbar>
We have added a few possibilities for styling and appearance.
The styling will orchestrate the coloration scheme:
The rounded prop let you configure the rounded corners for navbar items
This is an example of our docs navbar
<UiNavbar orientation="stacked" rounded="all" styling="filled" gap="five" category="primary" hoverColoration="light" noBackground > <UiNavbarItem active> <UiLink padding={{ block: 'four', inline: 'four' }}> <a href="#"> <UiIcon icon="Settings" /> Option 1 </a> </UiLink> </UiNavbarItem> <UiNavbarItem> <UiLink padding={{ block: 'four', inline: 'four' }}> <a href="#"> <UiIcon icon="BatteryFull" /> Option 2 </a> </UiLink> </UiNavbarItem> </UiNavbar>
<UiNavbar rounded="edges" styling="filled" category="tertiary"> <UiNavbarItem active> <UiText padding={{block: 'three', inline: 'four'}}>Option 1</UiText> </UiNavbarItem> <UiNavbarItem> <UiText padding={{block: 'three', inline: 'four'}}>Option 2</UiText> </UiNavbarItem> <UiNavbarItem> <UiText padding={{block: 'three', inline: 'four'}}>Option 3</UiText> </UiNavbarItem> </UiNavbar>
<UiNavbar rounded="all" styling="filled" gap="five" category="primary" hoverColoration="light"> <UiNavbarItem active> <UiText padding={{block: 'three', inline: 'four'}}>Option 1</UiText> </UiNavbarItem> <UiNavbarItem> <UiText padding={{block: 'three', inline: 'four'}}>Option 2</UiText> </UiNavbarItem> </UiNavbar>
<UiNavbar orientation="stacked" styling="bordered" gap="four" category="tertiary" noBackground> <UiNavbarItem active> <UiText padding={{block: 'three', inline: 'four'}}>Option 1</UiText> </UiNavbarItem> <UiNavbarItem> <UiText padding={{block: 'three', inline: 'four'}}>Option 2</UiText> </UiNavbarItem> </UiNavbar>