Tabs

Basic usage:

Tab Content 1
Stretch:
Tab Content 1
Navigation Card Type:
Tab Content 1

Editable tabs with lazy option:

Tab Content 1

Props:

Props of VcTabs

AttributeDescriptionTypeAccepted ValuesDefault
modelValueValue of the active tab. Use attribute name of TabPaneString------
stretchWhether width of tab automatically fits its containerBooleantrue | falsefalse
nav-typeType of NavigationStringdefault | carddefault

Props of VcTabPane

AttributeDescriptionTypeAccepted ValuesDefault
labelLabel of navigationString------
indexIndex of tab. (should be used if you want to keep order tabs after updating)number------
nameName of tab pane. Required!String------
iconIcon of tab paneString------
closableShow close iconBooleantrue | falsefalse
disabledWhether Tab is disabledBooleantrue | falsefalse
lazyWhether Tab is lazily renderedBooleantrue | falsefalse
tab-dataAdditional data for tabObject---{}
nav-classAdditional class for tab item navigationstring---

Props of VcTabNav

AttributeDescriptionTypeAccepted ValuesDefault
tab-itemsArray with tab items. { paneName: string, active: boolean, index?: number, label: string, disabled: boolean, isClosable: boolean icon?: string, props?: any, slots?: any, tabData?: any navClass?: string }[]. Whether navigation is used without pane, disabled and closable props should add into props (optional)ArrayVcPaneType[][]
stretchWhether width of tab automatically fits its containerBooleantrue | falsefalse

Slots:

VcTabs Slots

NameDescription
defaultDefault slot. Use VcTabPane component

VcTabPane Slots

NameDescription
defaultDefault slot. Content tab
tab-nameTab-pane's content by tab name
labelTab-pane's label (navigation tab label)

VcTabNav Slots

NameDescription
tabs-nav-itemTab label

Events:

Events of VcTabs

MethodDescriptionParameters
update:modelValuetriggers when activeName is changedtabName
tab-changetriggers when activeName is changedtabName
tab-removetriggers when tab-remove button is clickedtabName, tabData
tab-clicktriggers when a tab is clickedtabId, tabData

Events of VcTabNav

MethodDescriptionParameters
tab-closetriggers when a tab-remove is clickedtabData, index
tab-clicktriggers when a tab is clickedtabUid