thaw/demo_markdown/docs/tabs/mod.md
2024-06-04 17:30:40 +08:00

39 lines
1.7 KiB
Markdown

# Tabs
```rust demo
let selected_value = RwSignal::new(String::new());
view! {
<TabList selected_value>
<Tab value="apple">
"🍎 Apple"
</Tab>
<Tab value="pear">
"🍐 Pear"
</Tab>
</TabList>
}
```
### Tabs Props
| Name | Type | Default | Description |
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the tabs element. |
| value | `Model<String>` | `Default::default()` | Tabs value. |
| children | `Children` | | Tabs content. |
### Tab Props
| Name | Type | Default | Description |
| -------- | ----------------------------------- | -------------------- | -------------------------------------- |
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the tab element. |
| key | `String` | | The indentifier of the tab. |
| label | `String` | `Default::default()` | The label of the tab. |
| children | `Children` | | Tabs content. |
### Tab Slots
| Name | Default | Description |
| -------- | ------- | -------------- |
| TabLabel | `None` | label content. |