How to Create Vertical Tabs in Bootstrap 5, 4, and 3

Last Updated on January 6, 2025 by Roshan Parihar

In this tutorial, learn how to create vertical tabs in Bootstrap 5 and other version. The menus displays on the left side vertically and content is placed to the right. Users can click the menu to see its content.

Let’s find out how to create vertical tab menus in Bootstrap.

Create Vertical Tabs Menus in Bootstrap 5

To create vertical tabs in Bootstrap 5, you have to first place the tabs and its content inside <div> element with class .d-flex. After that, add the class .flex-column to the <div> element having class .nav-tabs.

Test it Live

Output

Create Vertical Tabs Menus in Bootstrap 5

You can click the output the see the live preview of the tab menus in Bootstrap 5. When you click the menu options, you will get its content on the right side.

Vertical Nav Tabs in Bootstrap 4

If you want to create vertical nav tabs in Bootstrap 4, you have to first wrap them inside the two grid columns. After that, add the class .flex-column to the div element in which the .nav-tabs class is present.

Test it Live

Output

Vertical Nav Tabs in Bootstrap 4

When you click the menu option given above, you will get the live preview with its matching content. You can click each menu options to see its working.

Vertically Aligned Tab Menus in Bootstrap 3

In Bootstrap 3, you have to first place the tabs and its content inside the two grid columns. After that, add the class .nav-stacked to the div element where you will get the class .nav-tabs.

Test it Live

Output

Vertically Aligned Tab Menus in Bootstrap 3

Initially, the content is in a hidden state except the start one. When you click the required tab menu, the other tab content becomes hidden and the selected tab menu content starts displaying.

The above examples contains the 3 tabs. Each tab contains its relevant content. However, you can increase the tab menus as per your requirements.