options
Description
Optional. Specifies an array of options that will be used as tabsUsage
options?: {
id: string | number;
label?: string;
icon?: string;
title?: string;
tooltip?: string;
}[];
Parameters
An object of the options array may have the following properties:
id- (required) the id of a tablabel- (optional) the text of a tabicon- (optional) the name of the icon to be used in a tabtitle- (optional) the native browser tooltip text shown on hover (sets the HTMLtitleattribute)tooltip- (optional) setsdata-tooltip-texton the tab's<button>; works with a parent<Tooltip>component
note
The tooltip is independent of the title prop. Both can be set simultaneously when each displays its own tooltip (the browser's native one and the SVAR one) but make sure it's not redundant in your case.
Example
<script>
const tabs = [
{ id: 0, label: "Info", icon: "wxi-alert" },
{ id: 1, label: "About" },
{ id: 2, label: "Contact" },
{ id: 3, label: "", icon: "wxi-check" }
];
</script>
<Tabs options={tabs} value={1} />
Related article: Creating tabs
Related sample: Tabs