Displays tabs:
+ +This component is only one of more ways to implement tabs. See the
There are several ways to adjust tabs styling. Please refer to
KTabs
as well
+ Displays the tab list of a tabbed interface:
+ +It is meant to be used together with
There are several ways to adjust tabs styling.
+ +Using props is the most straightforward:
+ +When that's not sufficient, appearanceOverrides
and appearanceOverridesActive
can be used, where the former complements or overrides styles common to all tabs and the latter contains styles specific to an active tab:
Lastly, the tab
slot can be used to adjust labels, for example to add icons. It's a scoped slot that exposes tab
object and isActive
boolean value:
KTabsList
A part of a tabbed interface that displays content associated with the active tab. It is meant to be used together with
KTabsPanel
Tabs are a design pattern describing a set of tab elements and panels containing content associated with them. Only one panel, the one corresponding to the active tab, is displayed at a time.
+ +There are several ways to implement tabs.
+Whenever possible, it is recommended to use
Using
These two components need to be linked via tabsId
and activeTabId
.
In the example above, tabs are rendered as buttons and their content is passed to
When implementing tabs with the router, it's the router view rather than
In such a case, define to
property with a router link object as its value in objects of the tabs
array:
Then, tabs will be rendered as router links and you can use the router view to display the active tab content, for example:
+ +Note that when using the router, tabs content is not passed to
However, it is still required to wrap the active tab content in
Place the router view outside of
Place the router view to
Place the router view outside of
Place the router view to
When there are two or more tabbed interfaces on one page, it is important to identify each one of them with an ID unique in regards to the page. Otherwise, some a11y features may break.
+ +This is achieved by providing a unique value to tabsId
property:
When using tabsId
to components that are meant to represent one tabbed interface: