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 ChartRegistry 3 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  e250fa6d_0aa8_aa21_cf5a_9acea1fbfe4a["drawer-example.tsx"]
  da02b53a_0c1d_d1a1_af31_74d99f1cdd7a["example"]
  e250fa6d_0aa8_aa21_cf5a_9acea1fbfe4a --> da02b53a_0c1d_d1a1_af31_74d99f1cdd7a
  381135fe_5f7a_910a_b8a2_691e9756a016["button"]
  e250fa6d_0aa8_aa21_cf5a_9acea1fbfe4a --> 381135fe_5f7a_910a_b8a2_691e9756a016
  e589c0b6_43e2_6bcc_6171_72950ae9ee68["drawer"]
  e250fa6d_0aa8_aa21_cf5a_9acea1fbfe4a --> e589c0b6_43e2_6bcc_6171_72950ae9ee68
  style e250fa6d_0aa8_aa21_cf5a_9acea1fbfe4a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/radix/components/example"
import { Button } from "@/registry/bases/radix/ui/button"
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/registry/bases/radix/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, ChartRegistry 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/radix/examples/drawer-example.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/examples).

Analyze Your Own Codebase

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

Try Supermodel Free