shadcn.io is not affiliated with official shadcn/ui
News Digest Chat Block for React
A bot chat that posts a digest card of four typed stories with a More fold and a Save toggle each, a Saved popover with Remove, and topic buttons that bring a new digest.
Installation
Overview
Show a morning news digest with this news digest chat for React with Base UI. A framed window of fixed height holds the thread between you and the Skimline bot, marked with a Badge that says Bot. Its digest card lists four stories, each with an outlet's two-letter tile, a read time, a headline, a one-line summary, a Collapsible "More" with one more sentence and a "Save" Toggle. The "Saved" button in the top bar opens a Popover that lists what you saved, each with Remove, and the topic buttons above the composer (Tech, Money, Local, Science) post "Show me ..." and bring another digest after a Typing Indicator Text. The composer's Shine Button is the only colored control, and the frame is ruled by Guides. It suits a newsletter bot, a reading app or any thread where a bot hands you a short list to keep or skip.
FAQ
What stays in the page, and how do I make it real?
All of it. The four digests are typed in this file, the outlets are made up and the summaries are written for the demo, as the card says. Saved stories live in the block's state, and the bot's replies come from a short script keyed on the topic words. Nothing is fetched. To wire it for real, post the topic to your feed service where post is called, append its stories as a digest card, and persist the saved ids where save sets state.
How do Save and Saved work together?
The Save toggle and the Saved popover read one list. Pressing Save adds the story, pressing it again or choosing Remove in the popover takes it off, and the count on the top bar's button follows. Two stories are saved when the page opens. The line under the composer says how many are saved after each change, and a screen reader announces it.
What do the topic buttons do?
Each posts "Show me" and the topic as your message, waits for the typing line and lands a reply with a digest of four stories on that topic. They are turned off while a reply is on its way, so replies never cross. Typing a word such as "money" or "science" in the field does the same.
What does More show?
One extra sentence per story in a fold under its summary. The fold is inert while closed, so it cannot be tabbed into, and its button names the outlet for a screen reader.
Is it usable with a keyboard and a screen reader?
Yes. The log is a focusable region announced as a log, every message starts with a hidden name and time, each digest is an article with a heading, the stories are a list, and Save and Remove carry the headline as hidden text. Pressed state is a fill and the word, not a color alone.