BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/basecn/sheet

Sheet

basecn/sheet
FreeComponent

Extends the Dialog component to display content that complements the main content of the screen.

Live preview

live · rendered by the registry
Rendered by basecn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://basecn.dev/r/sheet.json

Source

src/registry/components/ui/sheet.tsxbasecn.dev/r/sheet.json
1import * as React from "react";
2import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
3import { XIcon } from "lucide-react";
4
5import { cn } from "@/lib/utils";
6
7function Sheet({ ...props }: SheetPrimitive.Root.Props) {
8 return <SheetPrimitive.Root data-slot="sheet" {...props} />;
9}
10
11function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
12 return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
13}
14
15function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
16 return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
17}
18
19function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
20 return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
21}
22
23function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
24 return (
25 <SheetPrimitive.Backdrop
26 data-slot="sheet-overlay"
27 className={cn(
28 "data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:animation-duration-[300ms] data-[open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
29 className
30 )}
31 {...props}
32 />
33 );
34}
35
36function SheetContent({
37 className,
38 children,
39 side = "right",
40 ...props
41}: SheetPrimitive.Popup.Props & {
42 side?: "top" | "right" | "bottom" | "left";
43}) {
44 return (
45 <SheetPortal>
46 <SheetOverlay />
47 <SheetPrimitive.Popup
48 data-slot="sheet-content"
49 className={cn(
50 "bg-background data-[open]:animate-in data-[closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[closed]:duration-300 data-[open]:duration-500",
51 side === "right" &&
52 "data-[closed]:slide-out-to-right data-[open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
53 side === "left" &&
54 "data-[closed]:slide-out-to-left data-[open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
55 side === "top" &&
56 "data-[closed]:slide-out-to-top data-[open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
57 side === "bottom" &&
58 "data-[closed]:slide-out-to-bottom data-[open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
59 className
60 )}
61 {...props}
62 >
63 {children}
64// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • lucide-react

Files it writes

  • src/registry/components/ui/sheet.tsx

Facts

Registry
basecn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on basecn basecn.dev akash3444/basecn on GitHub Raw registry item This item as JSON

More from basecn

All 56 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionbasecnComponentsFree2 deps
AlertalertbasecnComponentsFree1 dep
Alert Dialogalert-dialogbasecnComponentsFree1 dep
Aspect Ratioaspect-ratiobasecnComponentsFreeno deps
AutocompleteautocompletebasecnComponentsFree2 deps
AvataravatarbasecnComponentsFree1 dep
BadgebadgebasecnComponentsFree2 deps
BreadcrumbbreadcrumbbasecnComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex