Home / File/ collapsible-demo.tsx — ui Source File

collapsible-demo.tsx — ui Source File

Architecture documentation for collapsible-demo.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  821d1f11_3121_ed9e_0e3a_e39178179bf8["collapsible-demo.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  821d1f11_3121_ed9e_0e3a_e39178179bf8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  821d1f11_3121_ed9e_0e3a_e39178179bf8 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  821d1f11_3121_ed9e_0e3a_e39178179bf8 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  3569d809_9117_156a_db42_ebbe426ff35a["collapsible"]
  821d1f11_3121_ed9e_0e3a_e39178179bf8 --> 3569d809_9117_156a_db42_ebbe426ff35a
  style 821d1f11_3121_ed9e_0e3a_e39178179bf8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { ChevronsUpDown } from "lucide-react"

import { Button } from "@/registry/new-york/ui/button"
import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/registry/new-york/ui/collapsible"

export function CollapsibleDemo() {
  const [isOpen, setIsOpen] = React.useState(false)

  return (
    <Collapsible
      open={isOpen}
      onOpenChange={setIsOpen}
      className="w-[350px] space-y-2"
    >
      <div className="flex items-center justify-between space-x-4 px-4">
        <h4 className="text-sm font-semibold">
          @peduarte starred 3 repositories
        </h4>
        <CollapsibleTrigger asChild>
          <Button variant="ghost" size="sm">
            <ChevronsUpDown className="h-4 w-4" />
            <span className="sr-only">Toggle</span>
          </Button>
        </CollapsibleTrigger>
      </div>
      <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
        @radix-ui/primitives
      </div>
      <CollapsibleContent className="space-y-2">
        <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
          @radix-ui/colors
        </div>
        <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
          @stitches/react
        </div>
      </CollapsibleContent>
    </Collapsible>
  )
}

Subdomains

Functions

Dependencies

  • button
  • collapsible
  • lucide-react
  • react

Frequently Asked Questions

What does collapsible-demo.tsx do?
collapsible-demo.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 collapsible-demo.tsx?
collapsible-demo.tsx defines 1 function(s): CollapsibleDemo.
What does collapsible-demo.tsx depend on?
collapsible-demo.tsx imports 4 module(s): button, collapsible, lucide-react, react.
Where is collapsible-demo.tsx in the architecture?
collapsible-demo.tsx is located at deprecated/www/registry/new-york/internal/sink/components/collapsible-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/internal/sink/components).

Analyze Your Own Codebase

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

Try Supermodel Free