Card
A visually distinct container for grouping related content, such as images, text, and actions, in a structured layout.
Loading...
Installation
Usage
API
Card Props
For Card Main
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | ReactNode | ReactNode[] | Primary container content of the card. Wraps Card.Area and Card.Image components. | - |
| shadow | "sm" | "md" | "lg" | "xl" | Controls the shadow depth of the card container. | "md" |
| radius | "none" | "sm" | "md" | "lg" | "xl" | Controls the border radius of the card container. | "xl" |
| className | string | Additional CSS classes to customize the card container styling. | - |
For Card Area
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | ReactNode | ReactNode[] | Content section inside the card, typically used for text or actions. | - |
| className | string | Additional CSS classes to customize the card content area. | - |
For Card Image
| Attribute | Type | Description | Default |
|---|---|---|---|
| src | string | Source URL of the image displayed inside the card. | - |
| alt | string | Alternative text describing the image for accessibility. | - |
| radius | "none" | "sm" | "md" | "lg" | "xl" | Controls the border radius applied to the card image. | "xl" |
| fit | "cover" | "contain" | "fill" | "none" | "scale" | Controls how the image fits within its container. | "cover" |
| className | string | Additional CSS classes to customize the card image styling. | - |
Credits
This component is inspired by Rehman Kalawant Design Shared On Github.