thaw/demo_markdown/docs/tabs/mod.md
luoxiaozero 1e4832a6d0
refactor demo docs (#64)
* demo: refactor docs

* demo: refactor docs

* demo: refactor docs

* demo: refactor docs
2023-12-31 23:33:05 +08:00

1.4 KiB

Tabs

let value = create_rw_signal(String::from("apple"));

view! {
    <Tabs value>
        <Tab key="apple" label="Apple">
            "apple"
        </Tab>
        <Tab key="pear" label="Pear">
            "pear"
        </Tab>
    </Tabs>
}

Tabs Props

Name Type Default Description
class MaybeSignal<String> Default::default() Addtional classes for the tabs element.
value RwSignal<String> TagVariant::Default Tabs value.
children Children Tabs content.

Tab Props

Name Type Default Description
class MaybeSignal<String> Default::default() Addtional classes for the tab element.
key String The indentifier of the tab.
label String The label of the tab.
children Children Tabs content.