Navigation
A navigation bar helps in navigating across various pages in a website. They are also referred to as a navbar.
Elixir offers a Basic Navigation component which contains the following parts -
Brand logo or title, search bar, navigation links, and an optional hamburger for medium and small screens.
Basic Navigation
The basic navigation consists of a brand name or logo, a search bar, links and an optional hamburger that appears on small/ medium sized screens.
To generate a basic navigation use the following classes:
navigation-bar
for the navigation container.
Other classes include-
-
navigation-desktop
-
Contains the navigation components that are displayed in medium to large screens.
-
navigation-mobile
-
Contains the search bar to enter the query text that is displayed in smaller screens.
-
brand-name.logo
-
Contains the brand name/ logo.
-
navigation-query
-
Contains the search bar to enter query text.
-
navigation-actions
-
Contains the navigation bar actions or links.
-
navigation-bar-hamburger
-
Contains the hamburger icon to open the navigation bar in smaller screens.
-
btn-navigation-close
-
Contains the close button to close the navigation bar in smaller screens.
Copy the code below to use the basic navigation.
Copy the code below to use the JavaScript logic to toggle between navigation bar open and close.