Badge Card
Draw immediate attention to specific items in a list with this clean and effective badge card.
This layout is commonly used in e-commerce shops and content feeds to highlight items that are new, featured, on sale, or have some other special status.

About this Component
The core of this component is a classic image-and-text card with an added status badge overlaid in the corner. The badge is implemented using CSS positioning to float above the rest of the card content, ensuring it's prominent without disrupting the card's underlying layout. The template includes multiple color variations for common badge types.
Features
- CSS Positioning: The badge is placed using
position: absolute
, making it easy to adjust its location within the card. - Modifier Classes: The example provides different color styles for badges (e.g.,
.badge-new
,.badge-featured
) that you can easily customize or expand upon. - Responsive Grid: Comes bundled with the standard responsive grid container to neatly arrange multiple cards.
- Accessible & Semantic: The component is built with a semantic
article
structure and ensures the badge text is part of the card's content, making it accessible to all users.
Code Breakdown
HTML Structure
Each card is an article
element with a class of .badge-card
. The first element inside the main link is a div
for the badge. Placing it here is straightforward and allows its text content to be read by assistive technologies. The rest of the card follows a familiar pattern with an image and a content block for the title and description.
CSS Styling
The badge placement for this component is in the positioning context. The parent card, .badge-card
, is given position: relative
. This establishes a boundary for any absolutely positioned children. The badge, .badge-card-badge
, is then styled with position: absolute
and positioned relative to its parent's edges using the top
and right
properties. This allows the badge to float over the other content. The pill shape of the badge is achieved with a very large border-radius
.
Code
Here's the complete, self-contained code. You can change a badge's appearance by editing the modifier classes (e.g., .badge-new
) or by creating your own.