SusCard

Surface card for grouping title, body, and actions.
Package
SusKit · Molecules (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
Variant | Prop<string> | "elevated" | v-model |
Selected | Prop<bool> | false | v-model |
Disabled | Prop<bool> | false | v-model |
Title | Prop<string> | "" | v-model |
Subtitle | Prop<string> | "" | v-model |
Text | Prop<string> | "" | v-model |
Image | Prop<string> | "" | v-model |
ImageHeight | Prop<float> | 0f | v-model |
ImageGradient | Prop<bool> | false | v-model |
Loading | Prop<bool> | false | v-model |
LoadingColor | Prop<string> | "primary" | v-model |
Hover | Prop<bool> | false | v-model |
Link | Prop<bool> | false | v-model |
Rounded | Prop<string> | "md" | v-model |
MinHeight | Prop<float> | 0f | v-model |
MinWidth | Prop<float> | 0f | v-model |
Slots
| Name |
|---|
header |
(default) |
actions |
footer |
Events
| Name | Field | Payload |
|---|---|---|
Click | OnClick | — |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-cardsus-card__actionssus-card__bodysus-card__headersus-card__image-gradientsus-card__image-wrapsus-card__loadersus-card__subtitlesus-card__textsus-card__titlesus-card--disabledsus-card--elevatedsus-card--flatsus-card--hoversus-card--linksus-card--loadingsus-card--outlinedsus-card--rounded-lgsus-card--rounded-pillsus-card--rounded-smsus-card--rounded-xlsus-card--selectedsus-card--tonalsus-slot
Usage
xml
<template>
<sus:SusCard Title="Card title"
Subtitle="Subtitle"
Text="Body text for the card."
Variant="elevated"
:Selected="Selected.Value"
:Hover="Hover.Value"
:Loading="Loading.Value"
@click="OnClick">
<template #actions>
<sus:SusButton Text="Details" Variant="text" />
</template>
</sus:SusCard>
</template>
<script>
public Prop<bool> Selected = new(false);
public Prop<bool> Hover = new(false);
public Prop<bool> Loading = new(false);
void OnClick() { /* fires when Link is true */ }
</script>csharp
var card = new SusCard();
card.Title.Value = "Card title";
card.Subtitle.Value = "Subtitle";
card.Text.Value = "Body text for the card preview.";
card.Variant.Value = "elevated";
card.Rounded.Value = "md";
card.OnClick += () => { /* … */ };Variant
elevated · flat · tonal · outlined
Notes
- Slots:
header, default body,actions,footer. - Set
Linkto enable click handling (OnClick). Image+ImageHeight/ImageGradientadd a media strip above the header.