Data displayPostCard

Open in Create
Search
astronomic.dev

PostCard

Free

For one post as a card: its picture, the topic and date, the title, a short excerpt and the author. The post recipes use it for you.

File
PostCard.astro
Group
Data display
Kind
Static: no JavaScript
Examples
1
import PostCard from "@astronomic-dev/ui/components/PostCard.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

In a Posts list

Two posts, each a PostCard in an <li>. The first has everything: the picture, the meta line (the topic link, the date and the reading time, a dot between each two), the title, an excerpt cut at three lines, and a footer with the author's photo and name. The second has no picture and no excerpt, and its topic is plain text: the card is shorter, and the two footers still line up on the bottom edge. The post recipes build their cards from it, so you only need it for your own layout.

From the blog

Force state
main.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.