Overview
Install via NPM
npm install @bolt/components-tabs
Usage
{% include "@bolt-components-tabs/tabs.twig" with {
panels: [
{
label: "Tab label 1",
content: "Tab panel 1.",
},
{
label: "Tab label 2",
content: "Tab panel 2.",
},
{
label: "Tab label 3",
content: "Tab panel 3.",
}
]
} only %}
Schema
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case
.
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
|
All of the tab panels. Each panel should contain a label and content. |
array
| — |
|
|
Horizontal alignment of tab labels. |
string
|
start
|
|
|
Set label spacing. |
string
|
small
|
|
|
Set panel spacing. |
string
|
small
|
|
|
Controls spacing placement on tab labels and panels. |
string
|
auto
|
|
|
- Minimum is 1 Set selected tab by number. To select the second tab, set to 2. |
integer
|
1
|
|