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
hrefstringURL for the whole card (link wrapper).
category{label:string; href?:string}Category/tag chip (optional link).
titlestringArticle title (also used for aria-label).
excerptstringShort 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.
dateISOstringMachine‑readable date for <time dateTime>.
dateLabelstringHuman‑readable date text.
showActionsbooleantrueShow bookmark and “more” buttons.
onBookmark() => voidClick handler for bookmark.
onMenu(e) => voidClick handler for kebab menu.
variant'image-left' | 'image-top''image-left'Layout.
className / *ClassNamestringSlot overrides: image/body/title/excerpt/tag.