Blog Card

Linked Tailwind blog post card with a 16:9 cover image, tag, relative date, title and a two line clamped excerpt. Hover and focus states cover the card.

src/registry/ui/blog-card.tsx/r/blog-card.json

Installation#

bash
npx shadcn@latest add @minidev/blog-card

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/blog-card.json

Usage#

tsx
import { BlogCard } from "@/components/ui/blog-card"

export function Example() {
  return (
    <BlogCard tag="Design" title="Why Hairline beats blur" excerpt="Borders and highlights, not soft shadows everywhere." date={new Date().toISOString()} />
  )
}

API reference#

BlogCard props
PropTypeDefault
title*string-
excerpt*string-
hrefstring"#"
imagestring-
datestring | Date-
tagstring-
classNamestring-

* required

Dependencies#

npm

React only

Examples#

All Landing page sections for React and Tailwind

Learn more