thaw/demo_markdown/docs/tab_list/mod.md

46 lines
1.8 KiB
Markdown
Raw Normal View History

# Tabs
```rust demo
2024-06-04 17:30:40 +08:00
let selected_value = RwSignal::new(String::new());
view! {
2024-06-04 17:30:40 +08:00
<TabList selected_value>
<Tab value="apple">
2024-06-05 10:04:34 +08:00
"Apple"
</Tab>
2024-06-04 17:30:40 +08:00
<Tab value="pear">
2024-06-05 10:04:34 +08:00
"Pear"
</Tab>
<Tab value="item1">
"Item 1"
</Tab>
<Tab value="item2">
"Item 2"
</Tab>
2024-06-04 17:30:40 +08:00
</TabList>
2024-01-25 22:18:33 +08:00
}
```
### Tabs Props
2024-02-09 22:44:22 +08:00
| 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
2024-02-09 22:44:22 +08:00
| 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. |
2024-01-25 22:18:33 +08:00
### Tab Slots
| Name | Default | Description |
| -------- | ------- | -------------- |
| TabLabel | `None` | label content. |