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 1 functions

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

"use client"

import { forwardRef } from "react"
import { Drawer as DrawerPrimitive } from "vaul"

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

const DrawerTrigger = DrawerPrimitive.Trigger

const DrawerContent = forwardRef<
  React.ElementRef<typeof DrawerPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
>(({ className, children, ...props }, ref) => (
  <DrawerPrimitive.Portal>
    <DrawerPrimitive.Overlay className="fixed inset-0 z-50 bg-black/80" />
    <DrawerPrimitive.Content
      ref={ref}
      className={cn(
        "fixed inset-x-0 bottom-0 z-50 mt-24 h-[96%] rounded-t-[10px] bg-background",
        className
      )}
      {...props}
    >
      <div className="absolute left-1/2 top-3 h-2 w-[100px] translate-x-[-50%] rounded-full bg-muted" />
      {children}
    </DrawerPrimitive.Content>
  </DrawerPrimitive.Portal>
))
DrawerContent.displayName = "DrawerContent"

export { DrawerTrigger, DrawerContent }

Subdomains

Functions

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 1 function(s): DrawerContent.
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 deprecated/www/components/drawer.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components).

Analyze Your Own Codebase

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

Try Supermodel Free