--- title: Navs and tabs summary: This guide covered the basics of creating different types of navigation bars and tabs, including horizontal, vertical, pill-shaped, and underline-styled navs. description: "Essential guide to nav styles: tabs, pills, dropdowns, and more." --- Navigation bars are essential components of modern web applications, providing users with intuitive ways to navigate between different sections and content. This guide explores various types of navigation bars and tabs that can be easily implemented using predefined classes in HTML and CSS. Each type serves specific use cases, from horizontal and vertical layouts to tabbed interfaces and dropdown menus. By utilizing these examples, developers can enhance the usability and aesthetics of their web projects. ## Horizontal nav If you want to create a horizontal navigation bar, you can use the `.nav` class. The `.nav-item` class is used to style each item within the navigation bar, and `.nav-link` is applied to the links. The `.active` class highlights the current active link, while the `.disabled` class styles non-clickable links. ```html
``` Look at the example below to see how the horizontal navigation bar is displayed. ```html example centered ``` ## Vertical nav To create a vertical navigation bar, add the `.flex-column` class to the `.nav` element. This arranges the navigation items in a column instead of a row, making it suitable for sidebars or vertical menus. ```html ``` There is an example below to see how the vertical navigation bar is displayed. ```html example centered ``` ## Tabs To create a tabbed navigation interface, use the `.nav-tabs` class. This is ideal for displaying different content sections within a single interface, where each tab represents a section. ```html ``` Example below shows how the tabbed navigation interface is displayed. ```html example centered ``` ## Pills For a pill-shaped navigation style, use the `.nav-pills` class. This is a great choice for a sleek, modern look, especially in interactive UI components. ```html example centered ``` ## Underline To create a navigation bar with an underline effect for active links, use the `.nav-underline` class. This provides a clean and minimalistic style. ```html example centered ``` ## Tabs with Dropdown You can enhance tabs by adding dropdown menus using the `.dropdown` class inside a `.nav-tabs` structure. This allows for additional options under a single tab, improving the navigation experience. ```html ``` Example below shows how tabs with dropdown menus are displayed. ```html example centered height="15rem" ```