Skip to content

Blog Post Card

Tailwind CSS blog post card with cover illustration, category badge, date, reading time, clamped excerpt, author row and a fully clickable area.

Also known as: blog card, article card, post preview card, blog post preview

Tailwind CSS Cards Responsive #article #blog #card #hover #responsive

Blog Post Card live demo

Open in new tab

Tailwind CSS code (HTML)

A warm, editorial blog post card built entirely with Tailwind CSS utility classes: a cover illustration with a category badge, publish date and reading time, a serif headline, a clamped excerpt and an author row. Use it on blog index pages, "related articles" sections, newsletter archives or a magazine-style homepage grid.

How it works

The root is .tbp-card, an article with group, relative and overflow-hidden. The top .tbp-cover block keeps a fixed 16:9 frame with aspect-[16/9] and holds an inline SVG landscape, so the card needs no external image. A category badge sits on top of it with absolute left-4 top-4.

The body is a flex column. The meta line uses a real time element with a datetime attribute, followed by the reading time. The headline link .tbp-link is the only interactive element: its after:absolute after:inset-0 pseudo-element stretches over the whole card, so clicking anywhere on the card opens the post while screen readers still hear a single, meaningful link. The excerpt is limited to three lines with line-clamp-3, so cards stay the same height in a grid even when excerpts differ in length.

Hover effects come from the group class: the cover SVG scales with group-hover:scale-105, the title turns orange and the arrow in the author row slides right. The shadow deepens on hover through arbitrary shadow-[...] values. There is no JavaScript.

Customization

  • max-w-sm on .tbp-card: raise to max-w-md, or remove it and place several cards in a grid sm:grid-cols-2 lg:grid-cols-3 gap-6 wrapper for a blog index.
  • aspect-[16/9] on .tbp-cover: use aspect-[4/3] or aspect-square for taller cover images.
  • Replace the svg inside .tbp-cover with <img src="https://placehold.co/800x450" alt="" class="h-full w-full object-cover"> to use a real photo; keep the group-hover:scale-105 classes for the zoom.
  • line-clamp-3 on the excerpt: change to line-clamp-2 for compact cards or remove it to show the full text.
  • font-serif text-2xl on the h3: switch to font-sans text-xl for a more product-like look.
  • from-orange-400 to-rose-500 on the avatar: change the gradient, or swap the initials for an img with rounded-full.
  • text-orange-700, bg-orange-100 and focus-within:ring-orange-500/30: replace orange with another Tailwind color to retheme the card.

Use cases

  • Blog index pages: each card shows a cover, category badge, date and reading time
  • Related articles: a clamped excerpt keeps cards a uniform height
  • Newsletter archives: an author row and fully clickable area make browsing simple
  • Magazine homepages: a serif headline gives an editorial feel in a grid

Accessibility

The card is an article with an h3 headline; adjust the heading level to fit your page outline. Only the title is a link, so keyboard users reach each card with one Tab stop and the accessible name is the post title rather than a generic "Read more". When the link has focus, focus-within:ring-4 draws a clear ring around the whole card. The cover SVG, avatar initials, dot separator and arrow are aria-hidden. Dates use time datetime for machine-readable values. All motion uses motion-reduce: variants, so zoom and arrow movement are disabled under prefers-reduced-motion.

Usage notes

If you need additional links inside the card (for example an author profile), give them relative z-10 so they sit above the stretched title link.

Blog Post Card at a glance

Framework
Tailwind CSS
Code
HTML
JavaScript
Only Tailwind CSS's own script
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Cards
License
Free for personal and commercial use

Questions about this template

Can I use the Blog Post Card code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Tailwind CSS's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Blog Post Card – free Tailwind CSS card template
Blog Post Card · free Tailwind CSS card template

More Cards

3D Flip Card – free Pure CSS card template

3D Flip Card

Three pure CSS 3D flip cards that turn on hover, keyboard focus or tap to reveal details and a link on the back.

Event Card with Photo and Date Badge – free Pure CSS card template

Event Card with Photo and Date Badge

Pure CSS event cards with a cover photo, ticket-stub date badge, category chip, time and venue details, price and a ticket button.

Cards with Hover Lift – free Pure CSS card template

Cards with Hover Lift

Pure CSS blog card grid where each card lifts with a deeper shadow and zooms its image on hover or keyboard focus.

Card with Image Overlay Text – free Bootstrap 6 card template

Card with Image Overlay Text

Dark Bootstrap 6 travel cards with headline, place and price set over full-bleed photos, a gradient scrim for readability, save buttons and a Toast.

Glassmorphism Card – free Tailwind CSS card template

Glassmorphism Card

Frosted glass profile card in Tailwind CSS with backdrop blur, a light reflection and a follow button over colorful animated gradient blobs.

Interactive Card with Hover Lift – free Bootstrap 6 card template

Interactive Card with Hover Lift

Bootstrap 6 clickable learning path cards that lift with a soft shadow on hover and keyboard focus, using hover-lift, stretched links and a level filter.