Home / Function/ Button() — ui Function Reference

Button() — ui Function Reference

Architecture documentation for the Button() function in button.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  8c0d2c13_769a_69ab_df4b_d03ab7542a2a["Button()"]
  aee1c23d_a3f5_974a_d73d_ad9b953709ce["button.tsx"]
  8c0d2c13_769a_69ab_df4b_d03ab7542a2a -->|defined in| aee1c23d_a3f5_974a_d73d_ad9b953709ce
  style 8c0d2c13_769a_69ab_df4b_d03ab7542a2a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/ui/button.tsx lines 44–53

  ({ className, variant, size, asChild = false, ...props }, ref) => {
    const Comp = asChild ? Slot : "button"
    return (
      <Comp
        className={cn(buttonVariants({ variant, size, className }))}
        ref={ref}
        {...props}
      />
    )
  }

Subdomains

Frequently Asked Questions

What does Button() do?
Button() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/button.tsx.
Where is Button() defined?
Button() is defined in deprecated/www/registry/new-york/ui/button.tsx at line 44.

Analyze Your Own Codebase

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

Try Supermodel Free