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 UIPrimitives 3 imports 10 functions

Entity Profile

Dependency Diagram

graph LR
  0b3a4d66_8f91_4b0d_4660_ad4a893ab531["drawer.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  0b3a4d66_8f91_4b0d_4660_ad4a893ab531 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  985d9848_e195_78d9_484f_a2a82f6475ad["vaul"]
  0b3a4d66_8f91_4b0d_4660_ad4a893ab531 --> 985d9848_e195_78d9_484f_a2a82f6475ad
  8ad666ec_1b20_adda_0392_87a60bdb3a68["utils"]
  0b3a4d66_8f91_4b0d_4660_ad4a893ab531 --> 8ad666ec_1b20_adda_0392_87a60bdb3a68
  style 0b3a4d66_8f91_4b0d_4660_ad4a893ab531 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 "@/registry/bases/base/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("cn-drawer-overlay fixed inset-0 z-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(
          "cn-drawer-content group/drawer-content fixed z-50",
          className
        )}
        {...props}
      >
// ... (66 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, UIPrimitives 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/bases/base/ui/drawer.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/ui).

Analyze Your Own Codebase

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

Try Supermodel Free