Overview
Structured content container for summaries, info and groups.Import
Usage
Live Preview
Run Locally
npm run tsx:core-gallery
Props
- title?: string — Card header title.
- subtitle?: string — Secondary header text.
- content?: string — Body content.
- footer?: string — Footer text.
- header?: boolean — Whether to render header region.
- showFooter?: boolean — Whether to render footer region.
- clickable?: boolean — Enables click events.
- onClick?/onHover?/onFocus?: handlers.
- selectable?: boolean — Toggles selected on click and calls onSelect.
- selected?: boolean — Initial selection state.
- onSelect?: (selected: boolean) => void — Selection callback.
- headerStyle?/contentStyle?/footerStyle?:
Record<string, any>— Region styles. - BaseProps: layout/theming props.
Methods
- setCardVariant(variant), setCardStyle(style), setCardSize(size), setCardState(state).
- setSelected(bool), setContent(text), setTitle(text), setSubtitle(text), setFooter(text).
- getCardConfig(): returns variant/size/state/selected/clickable/selectable.
- Static: createGrid(cards,
{ columns, spacing, alignment }), createCarousel(cards,{ spacing, autoScroll, scrollInterval }).
Installation
Import
Quick Start
Production Examples
Testing
Best Practices
- Usa
header/footersolo quando servono per evitare rumore visivo. - Preferisci
outlinedoghostper ridurre il contrasto in elenchi estesi.
