I am using the tailwindcss-stimulus-components on a project. The tabs work great, but I can't find how to set the active tab. The problem is that I have different links to forms in each tab and I want to return to the sending tab once the form is processed. Currently it always returns to the first tab . This is something I could do with Foundation. I am sure that there must be a way to di this.
Oh yeah, great point. I believe you just set
data-controller="tabs" data-tabs-index="1" to have it select the 2nd tab, but that would have to be rendered in the HTML.
We may want to add some other method of doing this too. Possibly looking at the anchor in the url and selecting the target with the matching ID.
Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.