svelte-headlessui icon indicating copy to clipboard operation
svelte-headlessui copied to clipboard

Controlling the active tab

Open chaichontat opened this issue 2 years ago • 4 comments

While #47 is in progress, is there a way for us to set the active tab from outside the component?

For example, would it be possible to expose https://github.com/rgossiaux/svelte-headlessui/blob/3c9dcc9b67213f12a02294c2de644e3dec4408ee/src/lib/components/tabs/TabGroup.svelte#L18 as a temporary fix?

chaichontat avatar Mar 09 '22 19:03 chaichontat

This is on the roadmap, yes--it's a recent change to Headless UI that I haven't ported back here yet. Actually the main blocker right now is that I want to merge in some larger typescript changes first (put them in a PR so you can see: #81) before I start catching up to new fixes & changes.

rgossiaux avatar Mar 09 '22 20:03 rgossiaux

Can anyone show an example on how to use this?

AlejandroAkbal avatar Jan 12 '23 08:01 AlejandroAkbal

Is there any update on this?

NERDYLIZARD avatar May 10 '23 03:05 NERDYLIZARD

Bumping this thread, any updates here? Currently, I haven't seen any implementations of tabs with svelte that can control externally the active tab.

socketopp avatar Sep 01 '23 18:09 socketopp