thaw/demo_markdown/docs/space/mod.md
2024-02-09 22:47:46 +08:00

1.3 KiB

Space

view! {
    <Space>
        <Button>"1"</Button>
        <Button>"2"</Button>
        <Button>"3"</Button>
    </Space>
}

Vertical

view! {
    <Space vertical=true>
        <Button>"1"</Button>
        <Button>"2"</Button>
        <Button>"3"</Button>
    </Space>
}

Gap

view! {
    <Space gap=SpaceGap::Large>
        <Button>"1"</Button>
        <Button>"2"</Button>
        <Button>"3"</Button>
    </Space>
    <Space gap=SpaceGap::WH(36, 36)>
        <Button>"1"</Button>
        <Button>"2"</Button>
        <Button>"3"</Button>
    </Space>
}

Space Props

Name Type Default Description
class OptionalProp<MaybeSignal<String>> Default::default() Addtional classes for the space element.
vertical bool false Whether to lay out vertically.
gap SpaceGap SpaceGap::Medium Space's gap.
children Children Space's content.