Home / File/ v0-button.tsx — ui Source File

v0-button.tsx — ui Source File

Architecture documentation for v0-button.tsx, a tsx file in the ui codebase. 9 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 9 imports 4 functions

Entity Profile

Dependency Diagram

graph LR
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1["v0-button.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  4a21c57e_b550_0cf7_9cc6_ca742d19d80a["edit-in-v0"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 4a21c57e_b550_0cf7_9cc6_ca742d19d80a
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  01f80303_3565_47cd_6558_aae4b65ba5a5["react-dom"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 01f80303_3565_47cd_6558_aae4b65ba5a5
  e750d152_1191_1793_7244_99c7f9c595f4["sonner"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> e750d152_1191_1793_7244_99c7f9c595f4
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  4ad968a1_2bd7_248c_f5ed_f80d5b5f7417["tooltip"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 4ad968a1_2bd7_248c_f5ed_f80d5b5f7417
  9798186b_08af_1d79_2ad7_d662300dc0ba["registry-styles"]
  2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 --> 9798186b_08af_1d79_2ad7_d662300dc0ba
  style 2c443a99_2f75_d1c0_95c6_7e02aa6f68f1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { editInV0 } from "@/actions/edit-in-v0"
import { Loader2 } from "lucide-react"
import { useFormStatus } from "react-dom"
import { toast } from "sonner"

import { cn } from "@/lib/utils"
import { Button, ButtonProps } from "@/registry/new-york/ui/button"
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/registry/new-york/ui/tooltip"
import { Style } from "@/registry/registry-styles"

type Size = "default" | "icon"

function V0Tooltip({
  size,
  style = "default",
  children,
}: React.PropsWithChildren<{ size: Size; style?: Style["name"] }>) {
  if (size === "default") {
    return <>{children}</>
  }

  return (
    <Tooltip>
      <TooltipTrigger asChild>
        {style === "new-york" ? (
          <span tabIndex={-1}>{children}</span>
        ) : (
          <>{children}</>
        )}
      </TooltipTrigger>
      <TooltipContent>
        {style === "new-york" ? (
          <>Not available in New York</>
        ) : (
          <>Open in v0</>
        )}
      </TooltipContent>
    </Tooltip>
  )
}

export function V0Button({
  name,
  size = "default",
  disabled,
  className,
  ...props
}: {
  name: string
  size?: Size
} & ButtonProps) {
  const [url, setUrl] = React.useState("https://ui.shadcn.com")

// ... (99 more lines)

Subdomains

Types

Dependencies

  • button
  • edit-in-v0
  • lucide-react
  • react
  • react-dom
  • registry-styles
  • sonner
  • tooltip
  • utils

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 ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in v0-button.tsx?
v0-button.tsx defines 4 function(s): Form, V0Button, V0Logo, V0Tooltip.
What does v0-button.tsx depend on?
v0-button.tsx imports 9 module(s): button, edit-in-v0, lucide-react, react, react-dom, registry-styles, sonner, tooltip, and 1 more.
Where is v0-button.tsx in the architecture?
v0-button.tsx is located at deprecated/www/components/v0-button.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