<card>
A surface for grouped content, with padding, rounded corners and a soft shadow.
<card style="w-full">
<img src="https://hypeapps.dev/gallery/assets/dish.jpg"
style="w-full h-160 rounded-lg"
fit="cover"/>
<text style="font-bold mt-12">Lemon ricotta pasta</text>
<text style="muted">20 minutes · serves 2</text>
</card>
Attributes
| Name | What it does | Default |
|---|---|---|
color |
Background color (auto-contrasts text); a bg-* in style= wins. color |
|
elevation |
Shadow depth as a number, mapped to shadow-*; a shadow-* in style= wins. number |
|
radius |
Corner radius in px; a rounded-* in style= wins. number |
|
variant |
Card style variant elevated, filled, outlined |
elevated |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.