Tabs
Hextra tabbed interfaces powered by Bootstrap 5 nav-tabs.
1 minute read
Tabbed interfaces powered by Bootstrap 5 nav-tabs. Each hextra/tab is nested inside a hextra/tabs container. Tabs support cross-page sync via localStorage when tabs share the same names.
{{< hextra/tabs >}}
{{< hextra/tab name="Tab One" >}}Content for tab one.{{< /hextra/tab >}}
{{< hextra/tab name="Tab Two" >}}Content for tab two.{{< /hextra/tab >}}
{{< /hextra/tabs >}}
Tab parameters (hextra/tab):
| Parameter | Description | Default |
|---|---|---|
name | Tab label | Tab <N> |
selected | Set to "true" to pre-select this tab | false |
Code samples across languages:
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
print("Hello, World!")
console.log("Hello, World!");
Pre-selected tab using selected="true":
brew install hugo
sudo apt install hugo
choco install hugo-extended