A versatile container for grouping related content and actions. Cards are foundational elements for building interfaces, providing a simple way to organize and present information.
This is a preview of the Astra Card component. It can contain various types of content.
To use the Astra Card component, simply add the <astra-card>
tag to your HTML. Here's a basic example:
<astra-card>A simple card component</astra-card>
The Astra Card component offers various customization options:
Adjust the card size with the size
attribute:
<astra-card size="base">Base size card</astra-card>
<astra-card size="small">Small size card</astra-card>
<astra-card size="compact">Compact size card</astra-card>
Cards can contain various types of content, including text, images, and other Astra UI components:
<astra-card>
<h2>Card Title</h2>
<p>This card contains a title and some text content.</p>
<astra-button>Action</astra-button>
</astra-card>
The Astra Card automatically adapts to light and dark color schemes, ensuring optimal visibility in different environments.