sheet-demo.tsx — ui Source File
Architecture documentation for sheet-demo.tsx, a tsx file in the ui codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 5777624c_5e1a_e571_01ea_4994de943e21["sheet-demo.tsx"] 57e86e45_ac6e_7278_be08_9092724e8401["button"] 5777624c_5e1a_e571_01ea_4994de943e21 --> 57e86e45_ac6e_7278_be08_9092724e8401 80cf663d_a411_487c_d69e_ac9d405cd2ec["input"] 5777624c_5e1a_e571_01ea_4994de943e21 --> 80cf663d_a411_487c_d69e_ac9d405cd2ec d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"] 5777624c_5e1a_e571_01ea_4994de943e21 --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d 58ac4ad9_4dcc_824e_b958_15469e530779["sheet"] 5777624c_5e1a_e571_01ea_4994de943e21 --> 58ac4ad9_4dcc_824e_b958_15469e530779 1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"] 1c2403dc_4584_9f39_4e98_855a7de18bd1 --> 5777624c_5e1a_e571_01ea_4994de943e21 style 5777624c_5e1a_e571_01ea_4994de943e21 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { Button } from "@/registry/new-york-v4/ui/button"
import { Input } from "@/registry/new-york-v4/ui/input"
import { Label } from "@/registry/new-york-v4/ui/label"
import {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/registry/new-york-v4/ui/sheet"
const SHEET_SIDES = ["top", "right", "bottom", "left"] as const
export function SheetDemo() {
return (
<div className="flex flex-col gap-6 md:flex-row">
<Sheet>
<SheetTrigger asChild>
<Button variant="outline">Open</Button>
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription>
Make changes to your profile here. Click save when you're
done.
</SheetDescription>
</SheetHeader>
<div className="grid flex-1 auto-rows-min gap-6 px-4">
<div className="grid gap-3">
<Label htmlFor="sheet-demo-name">Name</Label>
<Input id="sheet-demo-name" defaultValue="Pedro Duarte" />
</div>
<div className="grid gap-3">
<Label htmlFor="sheet-demo-username">Username</Label>
<Input id="sheet-demo-username" defaultValue="@peduarte" />
</div>
</div>
<SheetFooter>
<Button type="submit">Save changes</Button>
<SheetClose asChild>
<Button variant="outline">Close</Button>
</SheetClose>
</SheetFooter>
</SheetContent>
</Sheet>
<Sheet>
<SheetTrigger asChild>
<Button variant="outline">No Close Button</Button>
</SheetTrigger>
<SheetContent showCloseButton={false}>
<SheetHeader>
<SheetTitle>Custom Close</SheetTitle>
<SheetDescription>
This sheet has no default close button. Use the footer buttons
instead.
</SheetDescription>
</SheetHeader>
<div className="flex-1 px-4" />
<SheetFooter>
<SheetClose asChild>
<Button variant="outline">Cancel</Button>
</SheetClose>
<Button type="submit">Save</Button>
</SheetFooter>
</SheetContent>
</Sheet>
<div className="flex gap-2">
{SHEET_SIDES.map((side) => (
<Sheet key={side}>
<SheetTrigger asChild>
<Button variant="outline" className="capitalize">
{side}
</Button>
</SheetTrigger>
<SheetContent side={side}>
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription>
Make changes to your profile here. Click save when you're
done.
</SheetDescription>
</SheetHeader>
<div className="overflow-y-auto px-4 text-sm">
<h4 className="mb-4 text-lg leading-none font-medium">
Lorem Ipsum
</h4>
{Array.from({ length: 10 }).map((_, index) => (
<p key={index} className="mb-4 leading-normal">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
</p>
))}
</div>
<SheetFooter>
<Button type="submit">Save changes</Button>
<SheetClose asChild>
<Button variant="outline">Cancel</Button>
</SheetClose>
</SheetFooter>
</SheetContent>
</Sheet>
))}
</div>
</div>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- input
- label
- sheet
Source
Frequently Asked Questions
What does sheet-demo.tsx do?
sheet-demo.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, ContentSourcing subdomain.
What functions are defined in sheet-demo.tsx?
sheet-demo.tsx defines 1 function(s): SheetDemo.
What does sheet-demo.tsx depend on?
sheet-demo.tsx imports 4 module(s): button, input, label, sheet.
What files import sheet-demo.tsx?
sheet-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is sheet-demo.tsx in the architecture?
sheet-demo.tsx is located at apps/v4/app/(internal)/sink/components/sheet-demo.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/app/(internal)/sink/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free