shadcn.io is not affiliated with official shadcn/ui
Sheet examples · Details
Article Preview Sheet for React
A right-side sheet previewing an article with its byline, read time, two opening paragraphs and a Read Full Article button.
An article preview that slides in from the right: the title and subtitle in the header, the byline and read time, two opening paragraphs, then Read Full Article. People skim the opening without leaving the list they're in, and open the full page only when it's worth it.
Preview
Installation
FAQ
What does the preview show?
The title Getting Started with React and the subtitle A comprehensive guide for beginners in SheetHeader, a muted line with By John Smith and 5 min read, two paragraphs, and a full-width Read Full Article button.
How do I make Read Full Article go to the article?
Render the Button as a link to the article's URL.
Pass render={<a href="/articles/getting-started" />} and nativeButton={false}.
Is the dot in the byline read aloud?
No. The • between the author and the read time is aria-hidden, so a screen reader hears By John Smith, then 5 min read.
What does the sheet announce when it opens?
SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. Here the article's title is the sheet's title, and its subtitle is the description.
Related
- Product Details SheetA right-side sheet with a product image
- User Profile View SheetA right-side sheet showing a user's
- Standard CardA basic card with a title, a description
- Button with Text (Standard)The one filled action
- Standard DialogA share dialog with a read-only link, a
- Avatar StandardA round avatar with a profile picture and