Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Tag Popover Cards Blog Block for React

Three post cells on shared hairlines, each with a drawn wood-grain cover and three tag chips; a post with more tags shows a +3 button that opens a popover of the rest as links with counts.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A post card row with tags for React with Base UI, written for Tagwood, a forestry trade magazine. Three cells share their hairlines in one row from rail to rail, one on a phone. Each cell leads with a drawn wood-grain cover bled to its edges (growth rings, flat-sawn grain parting round a knot, quarter-sawn lines with ray flecks), then the post's tags as pill chips, the title as the cell's one link, a dek and a byline. A post shows its first three tags; one with more shows a "+3" button that opens a popover listing the rest as links with the number of posts under each. The chips and the button sit above the cell's link, so each stays its own target. The block ends in the row, and the next section's top rule closes it. It's built from Guides, Badge, Avatar and Popover, with CSS for the entrance and the hover. For trade magazines, documentation blogs and any post list where tags matter but space doesn't allow them all.

FAQ

How do the tags and the +3 work?

Each post lists its tags (a name and a count) in DRAFTS; the first three become chips and the rest go to rest. When a post has more than three, a "+N" button follows the chips, with an accessible name such as "Show 3 more tags". The button opens a popover headed "More tags" with one link per remaining tag and its count. A post with three tags or fewer shows no button.

How does the popover behave?

It opens on click, Enter or Space, closes on Escape or a click elsewhere, and returns focus to the button. The page behind stays usable. It is placed below the button at its start edge with an 8 px offset.

How are the covers drawn, and can I use photos?

Each tag family owns one wood-grain pattern, built from path data at the top of the file in two weights of the foreground colour: light at 20% and strong at 60%. Put an img with size-full object-cover in the cover's frame to use a photograph; the frame keeps its aspect ratio and the hairline under it.

How does it fit on a phone?

The three cells stack in one column, separated by a hairline, and the chips wrap onto as many lines as they need. Each cell is under a screen tall at 320 pixels.

Does it work right to left?

Yes. The chips start at the right, the popover opens from the button's start edge, and counts, dates and reading times are isolated with bdi. The covers are artwork and never mirror.

  • Pro

    Cards Grid Blog

    Card grids

    The six latest posts of an engineering blog as cards on shared hairlines: drawn greyscale covers, a category, the title as the card's one link, a one-line dek and a byline with the date and reading time.

  • Pro

    Tag Cloud Blog

    Topics and indexes

    A foraging blog's tag cloud: fourteen tags in five sizes derived from their post counts, each a toggle that lists its three latest posts in a fixed-height panel beside the cloud.

  • Pro

    Categories Blog

    Topics and indexes

    A houseplant magazine's category index: seven cells on shared hairlines, each a link with an icon ring, a scope, the latest post, a post count and a bar for its share, derived from the list of posts.

  • Pro

    A coffee journal's archive with a ruled band of category chips and their counts over eight post cells: choosing a chip removes the other posts, a polite line says how many show, and the wall keeps its height.

  • Pro

    Six text-only posts as raised cards in one tinted frame, two across: category, title as the card's one link, a short dek and a line with author, date and reading time.

  • Pro

    A developer-tools blog behind a search field: a slash shortcut focuses it, typing keeps the posts whose title or summary holds the words and marks them, and six cells draw tiny tool windows as covers.