Card
Cards are used for grouping information related to a single topic. They usually present some summarized content, an image, and a call-to-action button.
The Card
component is a compound of the following:
CardImage
- wraps the product image.CardContent
- wraps the product details.CardActions
- wraps the call-to-action button of the product card.
Importโ
import { Badge, Card, CardActions, CardImage, CardContent, Price } from '@faststore/ui'
Usageโ
Loading...
Propsโ
All Card-related components support all attributes also supported by the <div>
tag.
Cardโ
CardActionsโ
CardContentโ
CardImageโ
Customizationโ
data-store-card
data-store-card-image
data-store-card-content
data-store-card-actions
Best practicesโ
โ Do'sโ
- Use attractive images to grab shoppers' attention.
- Keep the card content short.
- Keep a consistent visual style. Otherwise, your design may look off-putting.
- Use transparent-backgrounded images.
- Use animation and visual hints to improve the user experience.
- Use the most appropriate card size for each device type.
- Make the entire card clickable to create larger touch zones.
โ Don'tsโ
- Don't use the
Card
component for product cards. Instead, use theProductCard
component. - Avoid cluttering cards with too many buttons and content.
- Avoid inline links.
Accessibilityโ
- Text elements and buttons must have sufficient color contrast against the background.