A Card summarizes an object that a user can select or navigate to.

Content
Cards are flexible containers that represent objects a user can select or navigate to. Most cards include a preview, metadata, and an optional footer. Spectrum includes several pre-defined card components with layouts for specific use cases, or you can combine these sections to create custom cards.
Asset
A AssetCard represents an asset such as an image, video, document, or folder. The CardPreview can contain either an Image or illustration. By default, images are displayed in a square preview without cropping. Add metadata in the Content section using the title and description slots.
User
A UserCard represents a user profile. It includes an Avatar and a Content section with title and description slots, along with an optional header image and Footer.


Product
A ProductCard represents a product a user can take action on. It has a a thumbnail image and a Content section with title and description slots, a Footer containing a call to action, and an optional header image.

Collection
A CollectionCardPreview displays up to 4 images in a collection of assets. When 4 images are provided, the first one is displayed as a larger hero image.
Gallery
A card can omit its Content section and display only a preview to create a gallery card typically seen in a waterfall layout. Ensure that the preview image has alt text, and any content placed above the preview has enough contrast against the background.

Custom
Combine the CardPreview, Content, and Footer components to create custom cards. Add additional elements and styles within these sections to create custom layouts as needed.
Skeleton
Wrap a card in a Skeleton to display a loading state. Placeholder text content and images are displayed in a skeleton style.
API
Card
<Card>
<CardPreview>
<Image /> or <Illustration />
</CardPreview>
<Content>
<Text slot="title" />
<ActionMenu />
<Text slot="description" />
</Content>
<Footer />
</Card>
| Name | Type | Default |
|---|---|---|
children | ReactNode | | Default: — |
The children of the Card. | ||
size | 'XS'
| 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the Card. | ||
density | 'compact'
| 'regular'
| 'spacious' | Default: 'regular'
|
The amount of internal padding within the Card. | ||
variant | 'primary'
| 'secondary'
| 'tertiary'
| 'quiet' | Default: 'primary'
|
The visual style of the Card. | ||
id | Key | Default: — |
The unique id of the item. | ||
value | T | Default: — |
The object value that this item represents. When using dynamic collections, this is set automatically. | ||
textValue | string | Default: — |
A string representation of the item's contents, used for features like typeahead. | ||
isDisabled | boolean | Default: — |
Whether the item is disabled. | ||
focusMode | 'child' | 'row' | Default: — |
Whether the row or its first focusable child element should be focused when navigating to the row. Defaults to 'row'. | ||
allowsArrowNavigation | boolean | Default: — |
Whether the row should support arrow key navigation even when the containing collection uses tab keyboard navigation. Allows users to navigate between rows with arrow keys while focus is on an interactive child element within the row. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||
AssetCard
<AssetCard>
<CardPreview>
<Image /> or <Illustration />
</CardView>
<Content>
<Text slot="title" />
<ActionMenu />
<Text slot="description" />
</Content>
</AssetCard>
| Name | Type | Default |
|---|---|---|
children | ReactNode | | Default: — |
The children of the Card. | ||
size | 'XS'
| 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the Card. | ||
variant | 'primary'
| 'secondary'
| 'tertiary'
| 'quiet' | Default: 'primary'
|
The visual style of the Card. | ||
id | Key | Default: — |
The unique id of the item. | ||
value | T | Default: — |
The object value that this item represents. When using dynamic collections, this is set automatically. | ||
textValue | string | Default: — |
A string representation of the item's contents, used for features like typeahead. | ||
isDisabled | boolean | Default: — |
Whether the item is disabled. | ||
focusMode | 'child' | 'row' | Default: — |
Whether the row or its first focusable child element should be focused when navigating to the row. Defaults to 'row'. | ||
allowsArrowNavigation | boolean | Default: — |
Whether the row should support arrow key navigation even when the containing collection uses tab keyboard navigation. Allows users to navigate between rows with arrow keys while focus is on an interactive child element within the row. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||
UserCard
<UserCard>
<CardPreview>
<Image />
</CardView>
<Avatar />
<Content>
<Text slot="title" />
<ActionMenu />
<Text slot="description" />
</Content>
<Footer />
</UserCard>
| Name | Type | Default |
|---|---|---|
variant | 'primary'
| 'secondary'
| 'tertiary' | Default: — |
The visual style of the Card. | ||
children | ReactNode | | Default: — |
The children of the Card. | ||
size | 'XS'
| 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the Card. | ||
id | Key | Default: — |
The unique id of the item. | ||
value | T | Default: — |
The object value that this item represents. When using dynamic collections, this is set automatically. | ||
textValue | string | Default: — |
A string representation of the item's contents, used for features like typeahead. | ||
isDisabled | boolean | Default: — |
Whether the item is disabled. | ||
focusMode | 'child' | 'row' | Default: — |
Whether the row or its first focusable child element should be focused when navigating to the row. Defaults to 'row'. | ||
allowsArrowNavigation | boolean | Default: — |
Whether the row should support arrow key navigation even when the containing collection uses tab keyboard navigation. Allows users to navigate between rows with arrow keys while focus is on an interactive child element within the row. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||
ProductCard
<ProductCard>
<CardPreview>
<Image slot="preview" />
</CardView>
<Image slot="thumbnail" />
<Content>
<Text slot="title" />
<ActionMenu />
<Text slot="description" />
</Content>
<Footer>
<Button /> or <LinkButton />
</Footer>
</ProductCard>
| Name | Type | Default |
|---|---|---|
variant | 'primary'
| 'secondary'
| 'tertiary' | Default: — |
The visual style of the Card. | ||
children | ReactNode | | Default: — |
The children of the Card. | ||
size | 'XS'
| 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the Card. | ||
id | Key | Default: — |
The unique id of the item. | ||
value | T | Default: — |
The object value that this item represents. When using dynamic collections, this is set automatically. | ||
textValue | string | Default: — |
A string representation of the item's contents, used for features like typeahead. | ||
isDisabled | boolean | Default: — |
Whether the item is disabled. | ||
focusMode | 'child' | 'row' | Default: — |
Whether the row or its first focusable child element should be focused when navigating to the row. Defaults to 'row'. | ||
allowsArrowNavigation | boolean | Default: — |
Whether the row should support arrow key navigation even when the containing collection uses tab keyboard navigation. Allows users to navigate between rows with arrow keys while focus is on an interactive child element within the row. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||