mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
docs(tabs): add dynamic example
This commit is contained in:
parent
9bd632173e
commit
45dfbb26cf
2 changed files with 61 additions and 12 deletions
|
@ -33,6 +33,14 @@ components: ["Tabs", "Tab", "TabContent", "TabsSkeleton"]
|
|||
</div>
|
||||
</Tabs>
|
||||
|
||||
### Re-rendering tabs
|
||||
|
||||
Use the [`#key` block](https://svelte.dev/docs#key) to dynamically update tab items or content.
|
||||
|
||||
The example below shows tabs and the bound `selected` index being programmatically updated.
|
||||
|
||||
<FileSource src="/framed/Tabs/TabsDynamic" />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<TabsSkeleton count={3} />
|
Loading…
Add table
Add a link
Reference in a new issue