Skip to content

Add an "active" parameter to tab shortcode to set default active tab #75

@cybardev

Description

@cybardev

In this line, it's hardcoded to set the first tab to be active:

class="tab-content-panel {{ cond (eq $idx 0) `active` `` }}"

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 >}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions