shadcn.io is not affiliated with official shadcn/ui
Sheet examples · Details
Product Details Sheet for React
A right-side sheet with a product image, price, stock badge, feature list and an Add to Cart button.
A quick product view in a right-side sheet: the image, an In Stock Badge next to the price, a short feature list and Add to Cart. Shoppers check the details and add the product without leaving the grid they're browsing.
Preview
Installation
FAQ
What does the product sheet show?
Premium Headphones as the title, a one-line description, a 400 by 300 placeholder image, the In Stock badge, the price $299.99, four features and a full-width Add to Cart button.
How do I use a real product photo?
Swap the src for your image and keep alt, width and height so the panel doesn't jump when it loads. The image is w-full rounded-md object-cover, so it fills the panel's width.
How do I show out of stock?
Change the badge to Out of Stock with variant="secondary" or outline, and disable Add to Cart. The word carries the state, so it doesn't rely on color.
Does Add to Cart close the sheet?
No, it's a plain Button. To close after adding, control the open state:
Pass open to Sheet; onOpenChange receives the next boolean.
Related
- User Profile View SheetA right-side sheet showing a user's
- Order Details SheetA right-side sheet with an order's
- Standard DialogA share dialog with a read-only link, a
- Standard CardA basic card with a title, a description
- Badge with Text (Standard)A default badge with a short label for a
- Button with Text (Standard)The one filled action