Blog Card One

A developer‑friendly blog/article card. Accessible and customizable with slot classNames. Includes Modern (image left) and Compact (image on top) layouts.

Examples

Modern (image left)

Pink chair

What is Tailwind CSS?

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eveniet, provident quasi recusandae repudiandae rerum temporibus!

John Doe|

Compact (image top)

Camera on yellow

What is PHP?

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eveniet, provident quasi recusandae repudiandae rerum temporibus!

Travis Fuller|

Installation

npx shadcn-extras@latest add blog-card-one

Props

PropTypeDefaultDescription
hrefstring—URL for the whole card (link wrapper).
category{label:string; href?:string}—Category/tag chip (optional link).
titlestring—Article title (also used for aria-label).
excerptstring—Short summary, truncated to 2 lines by default.
image{src:string; alt?:string}—Cover image; empty alt makes it decorative.
author{name:string; avatar?:string; href?:string}—Author meta; name can be a link.
dateISOstring—Machine‑readable date for <time dateTime>.
dateLabelstring—Human‑readable date text.
showActionsbooleantrueShow bookmark and “more” buttons.
onBookmark() => void—Click handler for bookmark.
onMenu(e) => void—Click handler for kebab menu.
variant'image-left' | 'image-top''image-left'Layout.
className / *ClassNamestring—Slot overrides: image/body/title/excerpt/tag.