docs(tabs): add dynamic example

This commit is contained in:
Eric Liu 2020-11-30 11:31:48 -08:00
commit 45dfbb26cf
2 changed files with 61 additions and 12 deletions

View file

@ -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} />