Home / File/ calendar-32.tsx — ui Source File

calendar-32.tsx — ui Source File

Architecture documentation for calendar-32.tsx, a tsx file in the ui codebase. 6 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 6 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  a5cda7e6_82a4_f952_a575_af29d04634f0["calendar-32.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  5000e233_363d_e409_8b5c_7e80d38646fe["calendar"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> 5000e233_363d_e409_8b5c_7e80d38646fe
  79b170ee_6170_9271_c7a0_b5527f29a7e1["drawer"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> 79b170ee_6170_9271_c7a0_b5527f29a7e1
  fa665cdb_5f79_b81a_95ab_12ba182fc175["label"]
  a5cda7e6_82a4_f952_a575_af29d04634f0 --> fa665cdb_5f79_b81a_95ab_12ba182fc175
  style a5cda7e6_82a4_f952_a575_af29d04634f0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

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

import { Button } from "@/registry/new-york/ui/button"
import { Calendar } from "@/registry/new-york/ui/calendar"
import {
  Drawer,
  DrawerContent,
  DrawerDescription,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/registry/new-york/ui/drawer"
import { Label } from "@/registry/new-york/ui/label"

export default function Calendar32() {
  const [open, setOpen] = React.useState(false)
  const [date, setDate] = React.useState<Date | undefined>(undefined)

  return (
    <div className="flex flex-col gap-3">
      <Label htmlFor="date" className="px-1">
        Date of birth
      </Label>
      <Drawer open={open} onOpenChange={setOpen}>
        <DrawerTrigger asChild>
          <Button
            variant="outline"
            id="date"
            className="w-48 justify-between font-normal"
          >
            {date ? date.toLocaleDateString() : "Select date"}
            <CalendarPlusIcon />
          </Button>
        </DrawerTrigger>
        <DrawerContent className="w-auto overflow-hidden p-0">
          <DrawerHeader className="sr-only">
            <DrawerTitle>Select date</DrawerTitle>
            <DrawerDescription>Set your date of birth</DrawerDescription>
          </DrawerHeader>
          <Calendar
            mode="single"
            selected={date}
            captionLayout="dropdown"
            onSelect={(date) => {
              setDate(date)
              setOpen(false)
            }}
            className="mx-auto [--cell-size:clamp(0px,calc(100vw/7.5),52px)]"
          />
        </DrawerContent>
      </Drawer>
      <div className="text-muted-foreground px-1 text-sm">
        This example works best on mobile.
      </div>
    </div>
  )
}

Subdomains

Functions

Dependencies

  • button
  • calendar
  • drawer
  • label
  • lucide-react
  • react

Frequently Asked Questions

What does calendar-32.tsx do?
calendar-32.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 calendar-32.tsx?
calendar-32.tsx defines 1 function(s): Calendar32.
What does calendar-32.tsx depend on?
calendar-32.tsx imports 6 module(s): button, calendar, drawer, label, lucide-react, react.
Where is calendar-32.tsx in the architecture?
calendar-32.tsx is located at deprecated/www/__registry__/new-york/blocks/calendar-32.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/__registry__/new-york/blocks).

Analyze Your Own Codebase

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

Try Supermodel Free