Collection of free vanilla JavaScript tab code examples. Update of December 2019 collection. 3 new items.

Related Articles

  1. CSS Tabs
  2. Bootstrap Tabs
  3. jQuery Tabs
  4. React Tabs
  5. Tailwind Tabs
  6. Vue Tabs

Author

  • Fikri Al-baihaqi

Made with

  • HTML / CSS / JS

About a code

Toggle Tab With Vanilla JavaScript

Easy toggle tab using only vanilla JavaScript with a simple UI.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Valentin

Made with

  • HTML / CSS / JS

About a code

Responsive Resaturant Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: font-awesome.css

Author

  • Michael Burridge

Made with

  • HTML / CSS / JS

About a code

Neumorphic Tabs

Tabbed content with JavaScript; Neumorphic styling; Dark mode; Remembers previous state on reload (with localStorage); Matches OS colour scheme (with prefers-color-scheme).

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Natalia Davydova

Made with

  • HTML (Pug) / CSS (SCSS) / JS (Babel)

About a code

Tabs Navigation UI

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Chyno Deluxe

Made with

  • HTML / CSS (SCSS) / JS

About a code

Mobile First Accordion To Tabs

This simple, mobile first, accordion to tabs example.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Joz

Made with

  • HTML / CSS (SCSS) / JS

About a code

Tabbed Content With CSS Grid

This pen aims to create a sustainable CSS Grid based content tabs component. Being a CSS Grid fan I naturally want the world to be governed by its awesomeness.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Ramnek Singh

Made with

  • HTML / CSS / JS

About a code

JavaScript Tabs

Tabs made with smooth scroll property. No animations or transition are used for tabs swithching. Tabs transition is done with the help of scroll-behaviour property and HTML id's.

Compatible browsers: Chrome, Firefox, Opera, Safari

Responsive: no

Dependencies: font-awesome.css

Author

  • Nicholas Fazzolari

Made with

  • HTML / CSS / JS

About a code

Navigation With Tabs

Three links that open tabs with content below the top horizontal navigation.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: bootstrap.css

Author

  • Rafaela Lucas

Made with

  • HTML / CSS (SCSS) / JS

About a code

Tabs - CSS + JS

Animated tabs with hover effect in JavaScript.

Compatible browsers: Chrome, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Mikael Ainalem

Made with

  • HTML / CSS / JS

About a code

Breadcrumbs & Tabs

A fusion between breadcrumbs & tabs creates a new kind of Rolodex-like navigation. Built with clip-path to cut out tabs and inset box-shadow to create depth.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Angel Davcev

Made with

  • HTML (Pug) / CSS (Sass) / JS (Babel)

About a code

Tab Switch Animation

UI/UX example: tab switch animation.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -