Basic Usage
Props
The title displayed at the top of the card. Prefer using a string value for better compatibility with accessibility and semantic HTML.
Icon to display in the card. Can be:
- A string icon name (e.g.,
"cat","bolt") from Font Awesome or Lucide - An image URL (will be rendered as an
<img>tag) - A custom React component/element
Type of Font Awesome icon. Options:
"solid", "regular", "light", "duotone", "thin", "sharp-solid", "brands"Only used when icon is a string and not an image URL.Icon library to use. Options:
"fontawesome", "lucide"Only used when icon is a string.Custom color for the icon. Accepts any CSS color value (hex, rgb, etc.). When provided, overrides the default icon color.
URL of a header image to display at the top of the card, above the title and content.
When
true, displays the card content in a horizontal layout with the icon and text side by side.URL to navigate to when the card is clicked. Makes the entire card clickable. External URLs automatically open in a new tab.
Call-to-action text displayed at the bottom of the card with an arrow icon.
Controls display of the arrow icon in the top-right corner. By default, arrows are shown for external links. Set explicitly to
true or false to override.When
true, disables the card link and shows reduced opacity for the CTA.Custom component to render as the root element. Useful for integrating with routing libraries like Next.js Link or React Router Link.
Additional CSS classes to apply to the card container.
The main content to display inside the card.
Examples
Icons
Layouts
Links and CTAs
Card States
Disabled Card
Custom Link Component
Use theas prop to integrate with routing libraries:
Next.js Example
The
as prop accepts any component that forwards standard link props including href.Fully Featured Example
Card Grid
Styling
The Card component automatically adapts to light and dark themes. Customize the appearance using theclassName prop:
Hover Effects
Cards with anhref prop automatically receive hover effects:
- Primary color border on hover
- Primary color CTA text on hover (when not disabled)
- Focus ring for keyboard navigation
Accessibility
The Card component includes built-in accessibility features:- Semantic HTML structure with proper heading hierarchy
- Focus indicators for keyboard navigation
- Support for screen readers with proper alt text for images
- Disabled state properly communicated to assistive technologies