Card
Introduction
The Card component provides a versatile container for displaying related content. It uses semantic HTML and ensures proper heading structure and content organization.
When to use
- Featured content sections
- Product displays
- Blog post previews
- Service highlights
- Team member profiles
- Any grouped content that benefits from visual containment
Usage
Props
Prop | Type | Default | Description |
---|---|---|---|
url | string | '' | URL for the card’s link wrapper |
img | string | '' | Path to the card’s image |
title | string | '' | Title text for the card |
class | string | '' | Additional CSS classes to apply to the card |
Accessibility features
- Uses semantic HTML structure
- Proper heading hierarchy with configurable levels
- Images include proper alt text support
- Links are properly structured for keyboard navigation
- Focus states are clearly visible
- Color contrast meets WCAG guidelines
Styling
Interactive example
Example card
This is an example of the Card component with an image, title, and custom content.
Your name