DEV Community

Cover image for svelte-tabs: Tabs component for Svelte apps!
Joe Attardi
Joe Attardi

Posted on

svelte-tabs: Tabs component for Svelte apps!

I am working on a Svelte component, and needed tabs.

I found this code written by Rich Harris and used that as a starting point, and made some modifications and enhancements on top of it.

Most of the hard work was done by Rich in the initial implementation.

It supports switching tabs with the mouse or with the arrow keys.

I am posting this in the hopes that some may find it useful.

You can find the library here:

And, you can find a simple demo here:

Top comments (3)

thevediwho profile image
Vaibhav Dwivedi

Hey, I like the code. Is there any way to create vertical tabs?

bejoynj profile image
Bejoy NJ

Hi Joe, Actually I am new to svelte and front-end development, is that possible to use another tabs inside main tabs content section using this package.

joeattardi profile image
Joe Attardi

Unfortunately, right now one of the limitations is that it doesn't support nested tabs.