mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 22:39:23 -05:00
39 lines
1.7 KiB
Markdown
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. |
|