Multiple Interactive Tabs
Examples
1-1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
2-1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<script>
import { InteractiveTabs } from "flowbite-svelte";
let tabs1 = [
{
name: "Profile-1",
id: 1,
content:
"1-1 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Dashboard-1",
id: 2,
content:
"1-2 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Settings-1",
id: 3,
content:
"1-3 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Contacts-1",
id: 4,
content:
"1-4 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
];
let tabs2 = [
{
name: "Profile-2",
id: 1,
content:
"2-1 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Dashboard-2",
id: 2,
content:
"2-2 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Settings-2",
id: 3,
content:
"2-3 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
{
name: "Contacts-2",
id: 4,
content:
"2-4 Lorem ipsum dolor sit amet, consectetur adipiscing ... ",
},
];
</script>
<InteractiveTabs tabId="myTab1" tabs={tabs1} />
<InteractiveTabs tabId="myTab2" tabs={tabs2} />
Props
The component has the following props, type, and default values. See types page for type information.
Name | Type | Default |
---|---|---|
tabId | string | 'myTab' |
activeTabValue | number | 1 |
tabs | InteractiveTabType[] |