Skip to content

Commit 780551f

Browse files
committed
docs(tabs): add "Container type with icons and secondary label" example
1 parent 22f1d24 commit 780551f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/src/pages/components/Tabs.svx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,21 @@ Use the `secondaryChildren` slot to customize the secondary label with custom ma
219219
</svelte:fragment>
220220
</Tabs>
221221

222+
## Container type with icons and secondary label
223+
224+
Container type tabs can use both `icon` and `secondaryLabel` for a primary label, icon, and optional secondary line (e.g. counts or status).
225+
226+
<Tabs type="container">
227+
<Tab label="Calendar" icon={Calendar} secondaryLabel="(12 events)" />
228+
<Tab label="Information" icon={Information} secondaryLabel="(3 new)" />
229+
<Tab label="Settings" icon={Settings} secondaryLabel="(2 pending)" disabled />
230+
<svelte:fragment slot="content">
231+
<TabContent>Calendar content</TabContent>
232+
<TabContent>Information content</TabContent>
233+
<TabContent>Settings content</TabContent>
234+
</svelte:fragment>
235+
</Tabs>
236+
222237
## Skeleton (default)
223238

224239
Show a loading state with the default skeleton variant.

0 commit comments

Comments
 (0)