Home / File/ drawer-example.tsx — ui Source File

drawer-example.tsx — ui Source File

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

File tsx ComponentRegistry UIPrimitives 3 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  4a7c84ce_402c_45ed_f23a_ed81415c4790["drawer-example.tsx"]
  f56be340_a522_c6f7_dec3_5906873d14c8["example"]
  4a7c84ce_402c_45ed_f23a_ed81415c4790 --> f56be340_a522_c6f7_dec3_5906873d14c8
  7328fa0a_98b6_fe77_42fd_0d1582b24604["button"]
  4a7c84ce_402c_45ed_f23a_ed81415c4790 --> 7328fa0a_98b6_fe77_42fd_0d1582b24604
  f0887f9c_6d23_33eb_8891_08fcd09c120e["drawer"]
  4a7c84ce_402c_45ed_f23a_ed81415c4790 --> f0887f9c_6d23_33eb_8891_08fcd09c120e
  style 4a7c84ce_402c_45ed_f23a_ed81415c4790 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/base/components/example"
import { Button } from "@/registry/bases/base/ui/button"
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/registry/bases/base/ui/drawer"

export default function DrawerExample() {
  return (
    <ExampleWrapper>
      <DrawerScrollableContent />
      <DrawerWithSides />
    </ExampleWrapper>
  )
}

const DRAWER_SIDES = ["top", "right", "bottom", "left"] as const

function DrawerWithSides() {
  return (
    <Example title="Sides">
      <div className="flex flex-wrap gap-2">
        {DRAWER_SIDES.map((side) => (
          <Drawer
            key={side}
            direction={
              side === "bottom" ? undefined : (side as "top" | "right" | "left")
            }
          >
            <DrawerTrigger asChild>
              <Button variant="outline" className="capitalize">
                {side}
              </Button>
            </DrawerTrigger>
            <DrawerContent className="data-[vaul-drawer-direction=bottom]:max-h-[50vh] data-[vaul-drawer-direction=top]:max-h-[50vh]">
              <DrawerHeader>
                <DrawerTitle>Move Goal</DrawerTitle>
                <DrawerDescription>
                  Set your daily activity goal.
                </DrawerDescription>
              </DrawerHeader>
              <div className="no-scrollbar overflow-y-auto px-4">
                {Array.from({ length: 10 }).map((_, index) => (
                  <p
                    key={index}
                    className="style-lyra:mb-2 style-lyra:leading-relaxed mb-4 leading-normal"
                  >
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
                    do eiusmod tempor incididunt ut labore et dolore magna
// ... (63 more lines)

Subdomains

Dependencies

  • button
  • drawer
  • example

Frequently Asked Questions

What does drawer-example.tsx do?
drawer-example.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-example.tsx?
drawer-example.tsx defines 3 function(s): DrawerExample, DrawerScrollableContent, DrawerWithSides.
What does drawer-example.tsx depend on?
drawer-example.tsx imports 3 module(s): button, drawer, example.
Where is drawer-example.tsx in the architecture?
drawer-example.tsx is located at apps/v4/registry/bases/base/examples/drawer-example.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/examples).

Analyze Your Own Codebase

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

Try Supermodel Free