Card
A bordered container with header, content and footer parts.
Installation
bash
shellui-native add card
Platforms: MAUI · Avalonia. Also installs card-header, card-content, card-footer.
Usage
Basic
Create project
Deploy your new project in one click.
<ui:Card WidthRequest="380">
<ui:CardHeader Title="Create project" Description="Deploy your new project in one click." />
<ui:CardContent>
<ui:Input Placeholder="Name of your project" />
</ui:CardContent>
<ui:CardFooter>
<ui:Button Text="Cancel" Variant="Outline" />
<ui:Button Text="Deploy" />
</ui:CardFooter>
</ui:Card><ui:Card Width="380">
<ui:CardHeader Title="Create project" Description="Deploy your new project in one click." />
<ui:CardContent>
<ui:Input Placeholder="Name of your project" />
</ui:CardContent>
<ui:CardFooter>
<ui:Button Text="Cancel" Variant="Outline" />
<ui:Button Text="Deploy" />
</ui:CardFooter>
</ui:Card>Not available on yet
MAUI and Avalonia
Variant(Default,Outline,Ghost,Elevated) andIsPressablework the same on both.- On Avalonia the XAML children of
Cardare collected inItems.
API
Card
XAML children go to Items on Avalonia and CardContent on MAUI.
| Property | Type | Default | Description |
|---|---|---|---|
Variant |
CardVariant |
Default |
Default, Outline, Ghost or Elevated. One of Default, Elevated. |
IsPressable |
bool |
false |
Reacts to hover and press, and raises Clicked. |
| Event | Arguments | Description |
|---|---|---|
Clicked |
— | Clicked or tapped (or Enter / Space with keyboard focus). |
CardHeader
| Property | Type | Default | Description |
|---|---|---|---|
Title |
string |
— | Heading text. |
Description |
string |
— | Supporting text under the title. |
CardContent
No properties of its own.
CardFooter
XAML children go to FooterContent.
No properties of its own.