shadcn.io is not affiliated with official shadcn/ui
Private Feed Links Account Block for React
Three private feeds of an account (security alerts and activity log as RSS, a sign-in calendar as iCalendar), each with a copyable link, when it was made and last read, a switch to turn it off and a Reset link that asks first.
Installation
Overview
Let people follow their own account in a feed reader or a calendar, with this private feed links section for React with Base UI. A hairline frame with a plus mark on each corner holds three rows: security alerts and the activity log as RSS, and the sign-in calendar as iCalendar. Each shows its link in a mono chip beside a Copy Button, when it was made and when a reader last asked for it, and a Switch that turns the feed off, which dims the link and stops it being copied. Reset link asks in place with Confirm and Cancel, then swaps in a new link and says the old one stopped working. A line says that anyone with a link can read that feed and to treat it like a password, and the header counts how many feeds are on. It's built from Switch, Copy Button, Badge, Button and Guides, with a CSS entrance only. For the notification or security page of any app that offers feeds.
FAQ
How do I add a feed?
Add an entry to FEEDS with an id, a name, a format (rss or ical), the ISO day it was made and last read ("" when never), a sentence and a list of tokens. The link is the origin, the feed's path and the current token; each reset moves to the next token in the list. The count in the header comes from the switches, and a new row needs no other change.
What stays local, and how do I make it real?
Nothing is served: the links and the tokens are typed, the switch and the reset change this page only, and the status line says so. In a real app each link carries a long random token that your server stores hashed, and resetting generates a new one and deletes the old one at once. The feed endpoint must check the token and the switch on every request, return nothing when the feed is off, and never put more in the feed than the account page itself shows.
How does the reset confirm work?
Reset link swaps in place for Confirm and Cancel, with focus on Confirm; Escape cancels from anywhere in the block and focus returns to Reset link. Confirming shows the new link in the row and says the old one stopped working. The row keeps its height during all of it, so nothing below moves.
Is a feed link a secret?
Yes: anyone who has it can read the feed without signing in, which is why the panel says to treat it like a password, and why resetting is one press away. Keep feeds to things the account owner could already see, leave out full addresses and codes, and let people turn a feed off rather than delete the habit of using it.