v0-button.tsx — ui Source File
Architecture documentation for v0-button.tsx, a tsx file in the ui codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR abf83309_7c64_07e9_522b_7a2cbfb851f2["v0-button.tsx"] 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 7c217573_70ba_6759_49cd_674343c15bd1["use-mobile"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> 7c217573_70ba_6759_49cd_674343c15bd1 47758573_16e6_4808_88b2_8dba3780ae24["use-mounted"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> 47758573_16e6_4808_88b2_8dba3780ae24 aae3c3f1_230a_9c11_a663_8bbc3f0ad054["icons"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> aae3c3f1_230a_9c11_a663_8bbc3f0ad054 57e86e45_ac6e_7278_be08_9092724e8401["button"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> 57e86e45_ac6e_7278_be08_9092724e8401 334339cf_a0db_b417_9d88_14840f1e3173["skeleton"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> 334339cf_a0db_b417_9d88_14840f1e3173 a2518e24_160d_3f8f_bb12_2206d8e84ab8["tooltip"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> a2518e24_160d_3f8f_bb12_2206d8e84ab8 c27c6e95_5daf_4dd4_dc3a_add496837570["search-params"] abf83309_7c64_07e9_522b_7a2cbfb851f2 --> c27c6e95_5daf_4dd4_dc3a_add496837570 style abf83309_7c64_07e9_522b_7a2cbfb851f2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { cn } from "@/lib/utils"
import { useIsMobile } from "@/hooks/use-mobile"
import { useMounted } from "@/hooks/use-mounted"
import { Icons } from "@/components/icons"
import { Button } from "@/registry/new-york-v4/ui/button"
import { Skeleton } from "@/registry/new-york-v4/ui/skeleton"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/registry/new-york-v4/ui/tooltip"
import { useDesignSystemSearchParams } from "@/app/(create)/lib/search-params"
export function V0Button({ className }: { className?: string }) {
const [params] = useDesignSystemSearchParams()
const isMobile = useIsMobile()
const isMounted = useMounted()
const url = `${process.env.NEXT_PUBLIC_APP_URL}/create/v0?base=${params.base}&style=${params.style}&baseColor=${params.baseColor}&theme=${params.theme}&iconLibrary=${params.iconLibrary}&font=${params.font}&menuAccent=${params.menuAccent}&menuColor=${params.menuColor}&radius=${params.radius}&item=${params.item}`
if (!isMounted) {
return <Skeleton className="h-8 w-24 rounded-lg" />
}
return (
<>
<Tooltip>
<TooltipTrigger asChild>
<Button
size="sm"
variant={isMobile ? "default" : "outline"}
className={cn(
"w-24 rounded-lg shadow-none data-[variant=default]:h-[31px] lg:w-8 xl:w-24",
className
)}
asChild
>
<a
href={`${process.env.NEXT_PUBLIC_V0_URL}/chat/api/open?url=${encodeURIComponent(url)}&title=${params.item}`}
target="_blank"
>
<span className="lg:hidden xl:block">Open in</span>
<Icons.v0 className="size-5" />
</a>
</Button>
</TooltipTrigger>
<TooltipContent>
<p>Open current design in v0</p>
</TooltipContent>
</Tooltip>
</>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- icons
- search-params
- skeleton
- tooltip
- use-mobile
- use-mounted
- utils
Source
Frequently Asked Questions
What does v0-button.tsx do?
v0-button.tsx is a source file in the ui codebase, written in tsx. It belongs to the DesignEngine domain, PreviewSystem subdomain.
What functions are defined in v0-button.tsx?
v0-button.tsx defines 1 function(s): V0Button.
What does v0-button.tsx depend on?
v0-button.tsx imports 8 module(s): button, icons, search-params, skeleton, tooltip, use-mobile, use-mounted, utils.
Where is v0-button.tsx in the architecture?
v0-button.tsx is located at apps/v4/app/(create)/components/v0-button.tsx (domain: DesignEngine, subdomain: PreviewSystem, directory: apps/v4/app/(create)/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free