Card
A bordered surface that groups related content, with optional header, title, description, content and footer parts.
Installation
Usage
src/app/app.ts
- Every part is optional. Header, content and footer share the same side padding, so they line up.
- Title and description wrap their content in
<text>. Content and footer don't, so use your own<text>elements there.
Content only
Content has no top padding, because it usually follows a header. Add pt-6 when it stands alone.
Pressable
pressable makes the card shrink slightly while a finger is down. It adds no event, so handle the tap yourself with (bindtap).
API
UiCard
No outputs.
All sub-components (UiCardHeader, UiCardTitle, UiCardDescription, UiCardContent, UiCardFooter) accept class.
Related
- Separator: divide content inside a card
- Typography: text styles for card content
- Handling taps and events
