mobile-nav.tsx — ui Source File
Architecture documentation for mobile-nav.tsx, a tsx file in the ui codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 195770e0_dba2_8af3_3503_fcbf07c5017b["mobile-nav.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 ba3d44f3_7b34_f9cc_6283_44817785c0df["link"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> ba3d44f3_7b34_f9cc_6283_44817785c0df f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb["navigation"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb 9416d7da_00df_60a8_615c_4b360d3b77f8["docs"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> 9416d7da_00df_60a8_615c_4b360d3b77f8 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 78f438c1_34dd_4824_63b3_180c613db378["use-meta-color"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> 78f438c1_34dd_4824_63b3_180c613db378 aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939 79b170ee_6170_9271_c7a0_b5527f29a7e1["drawer"] 195770e0_dba2_8af3_3503_fcbf07c5017b --> 79b170ee_6170_9271_c7a0_b5527f29a7e1 style 195770e0_dba2_8af3_3503_fcbf07c5017b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import Link, { LinkProps } from "next/link"
import { useRouter } from "next/navigation"
import { docsConfig } from "@/config/docs"
import { cn } from "@/lib/utils"
import { useMetaColor } from "@/hooks/use-meta-color"
import { Button } from "@/registry/new-york/ui/button"
import {
Drawer,
DrawerContent,
DrawerTrigger,
} from "@/registry/new-york/ui/drawer"
export function MobileNav() {
const [open, setOpen] = React.useState(false)
const { setMetaColor, metaColor } = useMetaColor()
const onOpenChange = React.useCallback(
(open: boolean) => {
setOpen(open)
setMetaColor(open ? "#09090b" : metaColor)
},
[setMetaColor, metaColor]
)
return (
<Drawer open={open} onOpenChange={onOpenChange}>
<DrawerTrigger asChild>
<Button
variant="ghost"
className="h-8 w-full gap-4 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className="!size-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3.75 9h16.5m-16.5 6.75h16.5"
/>
</svg>
<span className="sr-only">Toggle Menu</span>
<span className="flex h-8 flex-1 items-center justify-between rounded-md border bg-muted/50 px-2 text-sm font-normal text-muted-foreground shadow-none">
Search documentation...
</span>
</Button>
</DrawerTrigger>
<DrawerContent className="max-h-[80svh] p-0">
<div className="overflow-auto p-6">
<div className="flex flex-col space-y-3">
{docsConfig.mainNav?.map(
(item) =>
// ... (75 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- button
- docs
- drawer
- link
- navigation
- react
- use-meta-color
- utils
Source
Frequently Asked Questions
What does mobile-nav.tsx do?
mobile-nav.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 mobile-nav.tsx?
mobile-nav.tsx defines 3 function(s): MobileLink, MobileNav, open.
What does mobile-nav.tsx depend on?
mobile-nav.tsx imports 8 module(s): button, docs, drawer, link, navigation, react, use-meta-color, utils.
Where is mobile-nav.tsx in the architecture?
mobile-nav.tsx is located at deprecated/www/components/mobile-nav.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free