hugo-modules
hugo-modules copied to clipboard
Add an "active" parameter to tab shortcode to set default active tab
In this line, it's hardcoded to set the first tab to be active: https://github.com/gethugothemes/hugo-modules/blob/30ad48e108af9cc0d29aa5af45054d3fceca352d/tab/layouts/shortcodes/tabs.html#L17
Would be nice if this was the default behaviour unless an active or active="true" param was set in the shortcode. Like so (2nd tab is active):
{{< tabs "tab-group-name" >}}
{{< tab "first" >}}
First Tab
{{< /tab >}}
{{< tab "second" active="true" >}}
Second Tab
{{< /tab >}}
{{< tab "third" >}}
Third Tab
{{< /tab >}}
{{< /tabs >}}
Hey @cybardev, You can make a PR to contribute to this open-source project. I'll merge it.
Yep, I want to do it but am occupied for the next couple of ~~days~~ weeks. Will get on it afterwards.