Skip to content
loading...
Cover image for svelte-tabs: Tabs component for Svelte apps!

svelte-tabs: Tabs component for Svelte apps!

joeattardi profile image Joe Attardi twitter logo github logo ・1 min read

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: https://www.npmjs.com/package/svelte-tabs

And, you can find a simple demo here: https://joeattardi.github.io/svelte-tabs/

twitter logo DISCUSS (2)
Discussion
markdown guide
 

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.

 

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

Classic DEV Post from Aug 6 '19

What to put in your portfolio as a beginner web dev

Joe Attardi profile image
JavaScript wrangler. Check out my new book, Modern CSS! https://moderncss.info