Card
Card is a versatile component that can be used to display content and information in a variety of ways and can drive users to a desired action.
Design Hints
Accessiblity Hints
Simple Card
This is a simple card that can be used to display information or content. It can be used for different types of actions, such as displaying images, items, forms, services, or any other type of information.
Note: The max width for the card is set with max-w-sm
class which has to be removed in case you want the card to have a larger width.
Design Hints
Horizontal Card
Horizontal card layouts display collections of similar items efficiently, adapting to responsive design by stacking content vertically on smaller screens.
Note: The card is responsive out of the box and goes from a horizontal layout to a vertical layout lower than the md
breakpoint.
Features Card
A card for showcasing features or benefits of a product or service. It can be used to catch the user’s attention.
Design Hints
Stylized Cards
These are a set of stylized cards that can be used to add a bit of flair to your website. While they can be effective in certain situations, it is important to consider how well they will work with your design and layout.
Gradient Card
A card with a gradient background. The gradient used is subtle and non distracting, making it a great choice for a simple and clean look.
Design Hints
Glass Card
A card with a glass effect.
Warning: While it may look good, it can be difficult to read the text on a glass card. Be sure to check the contrast between the background and the text to ensure readability. It can also create a lot of edge cases where the user is unable to read the content inside the card based on the page background. Use with caution.
Note: The card itself uses backdrop-blur-3xl
class to create a glass effect. The glass card maybe easier to use than a gradient card since it automatically adjusts to the background color of the website. It is important to check the contrast between the text on the card and the background to ensure that it is easy to read. If you use bg-fixed
class on the background of the page, the glass card can be very distracting for a user and may create scenarios where the user is unable to read the content on the page.
Design Hints
Accessibility Testing Status
Component | NVDA | Windows Narrator | WAVE | Axe | IBM Equal Access |
---|---|---|---|---|---|
Simple Card | Yes | Yes | Yes | Yes | Yes |
Horizontal Card | Yes | Yes | Yes | Yes | Yes |
Features Card | Yes | Yes | Yes | Yes | Yes |
Gradient Card | Yes | Yes | Yes | Yes | Yes |
Glass Card | Yes | Yes | Yes | Yes | Yes |
Yes |
There are no clear accessibility guidelines for the cards pattern described by WAI-ARIA, so ravixUI implements basic accessbility patterns applicable to all elements present inside the cards while adhering to the WCAG 2.1 AA standard.
While the cards out of the box in ravixUI showcase action buttons inside the cards, it’s possible that the card itself can act as an action button based on context, for example, catalogs having product cards that can be clicked to view the product details or genres in a music application having a card for each genre that can be clicked to view songs of the genre.