shadcn.io is not affiliated with official shadcn/ui
No Reactions Empty State Block for React
A creator feed's post with no reactions: a drawn post with a dashed pill, a bar of six pressed toggles with names in tooltips, and a Copy link to share button that really writes the link to the clipboard.
Installation
Overview
Show a post nobody has answered yet, with this no reactions empty state for React with Base UI. It is the reactions panel of Cheerlark, a creator feed: a header over one small framed panel. The first band draws the post as a miniature, an avatar and name, a title and a picture block drawn as a hill, with a dashed pill under it where the reactions will gather. The second is the reaction bar, six toggles in a list, Like, Love, Cheer, Funny, Wow and Fire, each with an icon and a count that starts at 0, its name in a Tooltip and in its accessible name. Pressing one adds yours: its count goes to 1, the pill turns solid and the status says "1 reaction, from you". The foot holds the post's link and the Shine Button, the only colored control, Copy link to share, which really copies the link. The frame is ruled by Guides, and everything moves with CSS only. For a post, an article, an announcement or any item that people can react to.
FAQ
What stays in the page, and how do I make it real?
Your reactions stay in the page's state and only yours are counted, so nobody else can react here; a reload empties them and Start over empties them without one. To wire it for real, send the reaction to your API where the code says so, and render the counts the response gives back instead of 0 or 1. The one real effect is the copy: the typed link is written to the clipboard.
How does pressing a reaction work?
Each reaction is a button that says whether it is pressed. Pressing it adds yours and its count goes to 1, and the status line says how many reactions there are, such as "2 reactions, all from you". Pressing it again takes it back and the count returns to 0. You can press several; the pill on the drawn post turns solid while at least one is pressed.
Where are the reactions' names?
In a tooltip on hover and on focus, and in each button's accessible name together with its count, such as "Love, 1". The count shown on the button is hidden from assistive technology so it is not read twice.
What does Copy link to share do?
It writes the typed link, cheerlark.example/p/autumn-walk, to the clipboard, swaps its icon for a check for three seconds and says "Link copied" in the status line. If the clipboard refuses, because the page is not served over HTTPS or permission is denied, the status line says "Couldn't copy the link" instead. Nothing is shared with anyone.
Is it usable with a keyboard and a screen reader?
Tab reaches the six reactions one by one, then Copy link to share and Start over, which stays quiet and says so if pressed until there is a reaction. The drawing is hidden from assistive technology, and one polite status line says what changed without moving focus.
Related
- Pro
No Comments Empty State
Activity and updatesA document reviewer's comments sheet shown open in place at the end of a drawn page: a sticky margin note drawing, a field with a 0 / 500 counter and a Comment button that stacks comments with a Delete button on each.
- Pro
No Posts Empty State
Social and feedbackA social feed's first post with a live preview: a field with a 0 / 280 counter, a card that mirrors the text as you type, a paper plane on a trail, and a feed of two places that the post lands in.
- Pro
No Reviews Empty State
Social and feedbackA shop's reviews page before the first review: five outlined stars on a line, a list of the last three buyers each with a Request review button, and one Ask all three button that marks them in this demo.
- Pro
No Feedback Empty State
Social and feedbackA feedback widget's popover shown open in place on a drawn settings page: five drawn faces from flat to curved as radio buttons, bars that are all zero, a follow-up field and a Send feedback button that grows one bar.
- Pro
No Followers Empty State
Social and feedbackA creator page's empty followers state: a drawn profile card ringed by three dashed circles, a handle field that builds the profile link, a Copy profile link button, and a real QR code of the same link that re-encodes as you type.
- Pro
No Feature Requests Empty State
Social and feedbackA roadmap board's first request with a duplicate check: a drawn seedling with a dashed leaf, a title field that shows the two closest of three sample ideas with an Upvote instead button, and a list of two places for your requests.