Setup example
Other examples
Basic app structure
The whole point of Bifrost is to create a consistent look and feel for all Intility web apps,
and as such we would like for you to always use our <Nav>
component for your app menus.
Basically we provide three options for a basic React app layout:
- Use both sidebar and top bar
- Only standalone top bar
- Only standalone sidebar
Clickable links and routing
Usually you will do something like <NavLink to='/path'>
instead of <a href='#path'>
in the examples below.
If you use <NavLink>
from react-router-dom
it will add an .active
css class if the
link matches the current page, but you can also use className='active'
on
<a>
or <Link>
to mark the menu item as currently active.
Responsive navigation
By default, the <Nav>
component will provide a mobile-friendly fullscreen menu,
with the contents passed to the side
prop. A hamburger button to open the mobile menu
will appear in the top bar for screens smaller than 960px
wide, and at the same breakpoint
the sidebar is hidden.
For more advanced usage see breakpoint docs and Nav component.