input-group.tsx — ui Source File
Architecture documentation for input-group.tsx, a tsx file in the ui codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ee712d1a_70e5_6df4_b489_5fe78e2ee2b3["input-group.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 25383e8d_ca91_a50e_c3a8_5f228d02e1df["class-variance-authority"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> 25383e8d_ca91_a50e_c3a8_5f228d02e1df 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 57e86e45_ac6e_7278_be08_9092724e8401["button"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> 57e86e45_ac6e_7278_be08_9092724e8401 80cf663d_a411_487c_d69e_ac9d405cd2ec["input"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> 80cf663d_a411_487c_d69e_ac9d405cd2ec a1802a9d_1c52_7ef5_709a_134c4400c1c3["textarea"] ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 --> a1802a9d_1c52_7ef5_709a_134c4400c1c3 style ee712d1a_70e5_6df4_b489_5fe78e2ee2b3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york-v4/ui/button"
import { Input } from "@/registry/new-york-v4/ui/input"
import { Textarea } from "@/registry/new-york-v4/ui/textarea"
function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="input-group"
role="group"
className={cn(
"group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
"h-9 min-w-0 has-[>textarea]:h-auto",
// Variants based on alignment.
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
// Focus state.
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
// Error state.
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
className
)}
{...props}
/>
)
}
const inputGroupAddonVariants = cva(
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
{
variants: {
align: {
"inline-start":
"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
"inline-end":
"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
"block-start":
"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
"block-end":
"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5",
},
},
defaultVariants: {
align: "inline-start",
},
}
)
function InputGroupAddon({
// ... (111 more lines)
Domain
Subdomains
Functions
Dependencies
- button
- class-variance-authority
- input
- react
- textarea
- utils
Source
Frequently Asked Questions
What does input-group.tsx do?
input-group.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 input-group.tsx?
input-group.tsx defines 6 function(s): InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea.
What does input-group.tsx depend on?
input-group.tsx imports 6 module(s): button, class-variance-authority, input, react, textarea, utils.
Where is input-group.tsx in the architecture?
input-group.tsx is located at apps/v4/registry/new-york-v4/ui/input-group.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free