DEV Community

Giorgos Sarigiannidis
Giorgos Sarigiannidis

Posted on

Tabs on desktop, accordion on mobile (vanilla JS)

A tabbed component that turns into an accordion when tabs run out of space, using CSS and vanilla JavaScript. If you are on desktop, try to resize the screen and watch the tabs transforming to an accordion when they run out of space.

Discussion (0)