Image & Text Card

A versatile card component, bundled with a responsive grid container, for displaying items with an image and text.

Screenshot of three Image & Text cards in a responsive grid.

Get Source Code Preview

About this Component

This is one of the most common card patterns on the web. This template provides both the style for an individual card and a container to arrange multiple cards into a responsive, wrapping grid. It's a perfect starting point for blog indexes, product listings, or portfolio galleries.

Features

Code Breakdown

This component consists of two main parts: the outer grid container and the individual card elements.

The Grid Container

To arrange multiple cards, wrap them in a div with the class .cards-grid-container. This container uses CSS Grid to create the layout.

The Individual Card

The card itself begins with an article element. Inside, an anchor (a) tag makes the entire card a clickable unit. CSS variables (e.g. --it-card-padding) are defined at the top of the card's style rule for easy customization of its internal appearance. A subtle transform on hover provides a "lift" effect to signal interactivity.

Code

Here's the complete, self-contained code. The example includes three cards to demonstrate the grid layout. You can add or remove cards as needed.

View Output