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

popover-demo.tsx — ui Source File

Architecture documentation for popover-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
  b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9["popover-demo.tsx"]
  d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"]
  b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4
  163b5f6f_1cd3_6d8d_5305_80eec4895f60["input"]
  b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9 --> 163b5f6f_1cd3_6d8d_5305_80eec4895f60
  f826d306_7d63_5ba3_6a53_387904d37a9f["label"]
  b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9 --> f826d306_7d63_5ba3_6a53_387904d37a9f
  d1761ea6_65b9_f5fd_76e0_66663b00b300["popover"]
  b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9 --> d1761ea6_65b9_f5fd_76e0_66663b00b300
  style b5aa0ed7_1f3a_5f89_ec1f_e2597a0aebd9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Button } from "@/registry/default/ui/button"
import { Input } from "@/registry/default/ui/input"
import { Label } from "@/registry/default/ui/label"
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/registry/default/ui/popover"

export default function PopoverDemo() {
  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="outline">Open popover</Button>
      </PopoverTrigger>
      <PopoverContent className="w-80">
        <div className="grid gap-4">
          <div className="space-y-2">
            <h4 className="font-medium leading-none">Dimensions</h4>
            <p className="text-sm text-muted-foreground">
              Set the dimensions for the layer.
            </p>
          </div>
          <div className="grid gap-2">
            <div className="grid grid-cols-3 items-center gap-4">
              <Label htmlFor="width">Width</Label>
              <Input
                id="width"
                defaultValue="100%"
                className="col-span-2 h-8"
              />
            </div>
            <div className="grid grid-cols-3 items-center gap-4">
              <Label htmlFor="maxWidth">Max. width</Label>
              <Input
                id="maxWidth"
                defaultValue="300px"
                className="col-span-2 h-8"
              />
            </div>
            <div className="grid grid-cols-3 items-center gap-4">
              <Label htmlFor="height">Height</Label>
              <Input
                id="height"
                defaultValue="25px"
                className="col-span-2 h-8"
              />
            </div>
            <div className="grid grid-cols-3 items-center gap-4">
              <Label htmlFor="maxHeight">Max. height</Label>
              <Input
                id="maxHeight"
                defaultValue="none"
                className="col-span-2 h-8"
              />
            </div>
          </div>
        </div>
      </PopoverContent>
    </Popover>
  )
}

Subdomains

Functions

Dependencies

  • button
  • input
  • label
  • popover

Frequently Asked Questions

What does popover-demo.tsx do?
popover-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 popover-demo.tsx?
popover-demo.tsx defines 1 function(s): PopoverDemo.
What does popover-demo.tsx depend on?
popover-demo.tsx imports 4 module(s): button, input, label, popover.
Where is popover-demo.tsx in the architecture?
popover-demo.tsx is located at deprecated/www/registry/default/examples/popover-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).

Analyze Your Own Codebase

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

Try Supermodel Free