2024-01-03 20:52:56 +08:00
|
|
|
# Card
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
view! {
|
|
|
|
<Space vertical=true>
|
|
|
|
<Card title="title">"content"</Card>
|
|
|
|
<Card title="title">
|
|
|
|
<CardHeaderExtra slot>"header-extra"</CardHeaderExtra>
|
|
|
|
"content"
|
|
|
|
</Card>
|
|
|
|
<Card title="title">
|
2024-05-13 17:32:45 +08:00
|
|
|
<CardHeader>
|
|
|
|
"Header"
|
|
|
|
<CardHeaderDescription slot>
|
|
|
|
"Description"
|
|
|
|
</CardHeaderDescription>
|
|
|
|
<CardHeaderAction slot>
|
|
|
|
<Button appearance=ButtonAppearance::Transparent>
|
|
|
|
"..."
|
|
|
|
</Button>
|
|
|
|
</CardHeaderAction>
|
|
|
|
</CardHeader>
|
2024-01-03 20:52:56 +08:00
|
|
|
"content"
|
|
|
|
</Card>
|
|
|
|
<Card title="title">
|
|
|
|
<CardHeaderExtra slot>"header-extra"</CardHeaderExtra>
|
|
|
|
"content"
|
|
|
|
<CardFooter slot>"footer"</CardFooter>
|
|
|
|
</Card>
|
|
|
|
</Space>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Card Props
|
|
|
|
|
2024-02-09 22:44:22 +08:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
|
|
|
|
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the card element. |
|
|
|
|
| title | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Card title. |
|
|
|
|
| children | `Children` | | Card's content. |
|
2024-01-03 20:52:56 +08:00
|
|
|
|
|
|
|
### Card Slots
|
|
|
|
|
|
|
|
| Name | Default | Description |
|
|
|
|
| --------------- | ------- | --------------------- |
|
|
|
|
| CardHeader | `None` | Header content. |
|
|
|
|
| CardHeaderExtra | `None` | Header extra content. |
|
|
|
|
| CardFooter | `None` | Footer content. |
|