Navs and tabs

Examples for how to use Bootstrap’s included navigation components.

Custom Tabs

For our custom Nav Tabs, wrap your content in a .tab-container container. It is best not to use .card-header or other .card-* for this.

General Classic Tab 1

Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.

Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.

General Classic Tab 2

Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.

In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.

General Classic Tab 3

Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.

Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.

Learn More

General Classic Tab 1

Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.

Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.

General Classic Tab 2

Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.

In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.

General Classic Tab 3

Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.

Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.

Learn More

Vertical align left with .tab-container-left

General Classic Tab 1

Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.

Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.

General Classic Tab 2

Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.

In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.

General Classic Tab 3

Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.

Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.

Learn More

Vertical align right with .tab-container-right

General Classic Tab 1

Lorem ipsum dolor sit amet, ut qui commodo sensibus, id utinam inermis constituto vim. In nam dolorum interesset, per fierent ponderum ea. Eos aperiri feugiat democritum ne.

Ei saepe abhorreant temporibus cum, hinc praesent voluptatum ea has. Vis nihil tacimates senserit ut, quo posse labores honestatis te. Ex duo nullam posidonium deterruisset, altera aeterno duo eu.

General Classic Tab 2

Ei mel vocent latine intellegat. Nam ex sumo dolorum ceteros. Mei ne liber intellegam. Ferri quaeque mea in, mel munere rationibus at.

In has homero blandit vituperatoribus, eum latine interpretaris eu, sale commodo has eu.

General Classic Tab 3

Munere consetetur an usu, vis quot maiestatis concludaturque at. Ne etiam indoctum referrentur eum, vix legimus nominati eu. Epicurei quaestio sea ut, munere deserunt adipiscing qui te.

Disputando voluptatibus ei sit. Et veri deserunt theophrastus pri, at mutat choro eum.

Learn More

Base nav

The base .nav component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling.

Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states. Swap modifier classes to switch between each style.

Use <ul>s or <ol> to order your items or use your own with a <nav> element. Because the .nav uses display: flex, the nav links behave the same as nav items would but without the extra markup.

Horizontal alignment

Change the horizontal alignment of your nav with flexbox utilities. By default, navs are left-aligned, but you can easily change them to center or right aligned.

Centered with .justify-content-center

Centered with .justify-content-end

Vertical alignment

Stack your navigation by changing the flex item direction with the .flex-column utility. Need to stack them on some viewports but not others? Use the responsive versions (e.g., .flex-sm-column).

Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states.

Again, because the .nav uses display: flex, the nav links behave the same as nav items would but without the extra markup.

Tabs

Adds the .nav-tabs class to generate a tabbed interface.

Take that same HTML but use .nav-pills instead:

Fill and justify

Force your .nav's contents to extend the full available width one of two modifier classes. To proportionately fill all available space with your .nav-item's, use .nav-fill. Notice that all horizontal space is occupied, but not every nav item has the same width.

When using a <nav>-based navigation, you can safely omit .nav-item as only .nav-link is required for styling <a> elements.

For equal-width elements, use .nav-justified. All horizontal space will be occupied by nav links, but unlike the .nav-fill above, every nav item will be the same width.

Similar to the .nav-fill example using a <nav>-based navigation.

Working with flex utilities

If you need responsive nav variations, consider using a series of flexbox utilities. While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.

Note that navigation bars, even if visually styled as tabs with the .nav-tabs class, should not be given role="tablist", role="tab" or role="tabpanel" attributes. These are only appropriate for dynamic tabbed interfaces, as described in the WAI ARIA Authoring Practices. The aria-current attribute is not necessary on dynamic tabbed interfaces since Bootstrap's JavaScript handles the selected state by adding aria-selected="true" on the active tab.

Tabs with dropdowns

Pills with dropdowns


Tab Navigation (Tabs)

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.
Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.
Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.

Tab Navigation (Pills)

Vertical Tabs

Cillum ad ut irure tempor velit nostrud occaecat ullamco aliqua anim Lorem sint. Veniam sint duis incididunt do esse magna mollit excepteur laborum qui. Id id reprehenderit sit est eu aliqua occaecat quis et velit excepteur laborum mollit dolore eiusmod. Ipsum dolor in occaecat commodo et voluptate minim reprehenderit mollit pariatur. Deserunt non laborum enim et cillum eu deserunt excepteur ea incididunt minim occaecat.
Culpa dolor voluptate do laboris laboris irure reprehenderit id incididunt duis pariatur mollit aute magna pariatur consectetur. Eu veniam duis non ut dolor deserunt commodo et minim in quis laboris ipsum velit id veniam. Quis ut consectetur adipisicing officia excepteur non sit. Ut et elit aliquip labore Lorem enim eu. Ullamco mollit occaecat dolore ipsum id officia mollit qui esse anim eiusmod do sint minim consectetur qui.
Fugiat id quis dolor culpa eiusmod anim velit excepteur proident dolor aute qui magna. Ad proident laboris ullamco esse anim Lorem Lorem veniam quis Lorem irure occaecat velit nostrud magna nulla. Velit et et proident Lorem do ea tempor officia dolor. Reprehenderit Lorem aliquip labore est magna commodo est ea veniam consectetur.
Eu dolore ea ullamco dolore Lorem id cupidatat excepteur reprehenderit consectetur elit id dolor proident in cupidatat officia. Voluptate excepteur commodo labore nisi cillum duis aliqua do. Aliqua amet qui mollit consectetur nulla mollit velit aliqua veniam nisi id do Lorem deserunt amet. Culpa ullamco sit adipisicing labore officia magna elit nisi in aute tempor commodo eiusmod.