Tabs
Usage
Pass an array to the items
prop of the Tabs component. Each item can have the following properties:
label
- The label of the item.icon
- The icon of the item.slot
- A key to customize the item with a slot.content
- The content to display in the panel by default.disabled
- Determines whether the item is disabled or not.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Vertical
You can change the orientation of the tabs by setting the orientation
prop to vertical
.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Default index
You can set the default index of the tabs by setting the default-index
prop.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
v-model
to control the selected index.Listen to changes
You can listen to changes by using the @change
event. The event will emit the index of the selected item.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
You can use the content
prop and set it to false
to avoid the rendering of the HTML content if you don't need it.
Control the selected index
Use a v-model
to control the selected index.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Slots
You can use slots to customize the buttons and items content of the Accordion.
default
Use the #default
slot to customize the content of the trigger buttons. You will have access to the item
, index
, selected
and disabled
in the slot scope.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
icon
Use the #icon
slot to customize the icon of the trigger buttons. You will have access to the item
, index
, selected
and disabled
in the slot scope.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
item
Use the #item
slot to customize the items content. You will have access to the item
, index
and selected
properties in the slot scope.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
You can also pass a slot
property to customize a specific item.
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }
Props
{}
"horizontal"
undefined
0
[]
true
false
Config
{ "message": "You should use slots with <ContentRenderer>", "value": {}, "excerpt": false, "tag": "div" }