Style
Cards can be used in light and dark themes. They act as a blank canvas where elements and styles can be placed inside.
Theme
Color
Cards are secondary layouts that shouldn’t command too much attention and blend in with whatever background they’re placed on. The card container is the only required element and it consists of a background color and rounded corners. A thin border is required if the card background is the same color as the background it's placed on.
Layout
A card features header, body, and footer sections. Those sections should include a limited amount of content to ensure that the card doesn’t become too tall.
Header
The header section is required, it introduces what the content is and shouldn’t be hidden.
Body
The body section can include a headline, text, an icon, or sometimes an image. The body section describes the content in more detail and shouldn’t be hidden.
Footer
The footer section can include normal links or a call to action. It can be hidden if necessary if there’s content included where a user can take an action.
Responsive design
Breakpoints
Cards will get thinner or move below each other on smaller screens.
Large screens
Small screens
Spacing
Example | Token | Description |
---|---|---|
16 | --rh-space-lg | 16px spacer |
24 | --rh-space-xl | 24px spacer |
32 | --rh-space-2xl | 32px spacer |
48 | --rh-space-3xl | 48px spacer |
Container padding
Container padding defines how far away content is from the edges of the component. When cards become wider, the container padding increases. When they become thinner, the container padding decreases. See more examples.
Desktop
Mobile
Related elements or patterns
Feedback
To give feedback about anything on this page, contact us.
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit