loading...

Tabs on desktop, accordion on mobile (vanilla JS)

gsarig profile image Giorgos Sarigiannidis ・1 min read

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

pic
Editor guide