Home / File/ drawer.tsx — ui Source File

drawer.tsx — ui Source File

Architecture documentation for drawer.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 3 imports 10 functions

Entity Profile

Dependency Diagram

graph LR
  65dddf82_0992_932d_abd9_4edb4ea4a696["drawer.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  65dddf82_0992_932d_abd9_4edb4ea4a696 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  985d9848_e195_78d9_484f_a2a82f6475ad["vaul"]
  65dddf82_0992_932d_abd9_4edb4ea4a696 --> 985d9848_e195_78d9_484f_a2a82f6475ad
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  65dddf82_0992_932d_abd9_4edb4ea4a696 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style 65dddf82_0992_932d_abd9_4edb4ea4a696 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { Drawer as DrawerPrimitive } from "vaul"

import { cn } from "@/lib/utils"

function Drawer({
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
  return <DrawerPrimitive.Root data-slot="drawer" {...props} />
}

function DrawerTrigger({
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
  return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
}

function DrawerPortal({
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
  return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
}

function DrawerClose({
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
  return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
}

function DrawerOverlay({
  className,
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
  return (
    <DrawerPrimitive.Overlay
      data-slot="drawer-overlay"
      className={cn(
        "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
        className
      )}
      {...props}
    />
  )
}

function DrawerContent({
  className,
  children,
  ...props
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
  return (
    <DrawerPortal data-slot="drawer-portal">
      <DrawerOverlay />
      <DrawerPrimitive.Content
        data-slot="drawer-content"
        className={cn(
          "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
          "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
// ... (76 more lines)

Subdomains

Dependencies

  • react
  • utils
  • vaul

Frequently Asked Questions

What does drawer.tsx do?
drawer.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in drawer.tsx?
drawer.tsx defines 10 function(s): Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger.
What does drawer.tsx depend on?
drawer.tsx imports 3 module(s): react, utils, vaul.
Where is drawer.tsx in the architecture?
drawer.tsx is located at apps/v4/registry/new-york-v4/ui/drawer.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/ui).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free