Skip to content
All posts

Bootstrap vertical tabs

Vertical tabs are a handy UI element that let you collapse and hide content when not needed.

When utilizing these tabs in an application - they can act as a sidebar on the left or top of your container.

Vertical tabs are a great way to reduce the number of horizontal scroll movements the user has to do. They're also pretty good for small mobile devices and so will help your mobile friend, too.

This tutorial is going to walk you step-by-step through making this yourself, using Bootstrap 4 or 5 as a base and some custom CSS as sugar.

Also, you can easily build upon this code to implement your own tabbed interface.

Alright, let's do it!

When to Use Vertical Tabs in Bootstrap & Web Design?

Vertical tabs are very similar to horizontal tabs, the only difference being that the tabbed interface is arranged vertically instead of horizontally. Vertical tabs have been around since the early days of the web, but they seem to be gaining more popularity as people become more accustomed to this type of interface.

Vertical tabs are particularly useful when displaying a lot of information on a single screen. For example, a website may have numerous articles or blog posts that need to be presented in a compact format. Using vertical tabs allows you to display all these items at once without having to scroll down through each one individually or click on them individually.

In addition, vertical tabs are great for displaying multiple categories or product listings from different vendors. This can help customers find exactly what they're looking for without having to dig through long lists of results or search through multiple pages of content.

Using vertical tabs in this way also makes it easier for visitors to find specific information quickly without having to spend too much time searching through your site's content or having to click on each individual result just to see what it looks like (which can be frustrating if someone is trying to look for something specific).

When not to use vertical tabs?

Vertical tabs are great for displaying multiple related items but can become a bit overwhelming if you have too many items in your layout.

that they take up so much space. If you have a lot of content, then you’ll have to scroll down a long page just to get to the bottom of your content. This can be very annoying for users who don’t want to scroll down or who are on mobile devices. If you have more than about 7 or 8 tabs, it’s probably a good idea to use something else.

It is also worth noting that in some cases, horizontal tabs might be better suited for your design. For example, if you have a long list of links (like an FAQ page), horizontal tabs may provide more space for text on each tab and make it easier to read.

If you liked this snippet, you might also enjoy exploring Bootstrap checkbox list or Bootstrap Masonry .