Inputgroups
7 props
stringstringReactNodeReactNode() => voidstringstringNotes
Use the grouped fields to inspect the floating label motion, focus underline, destructive state, and suffix-button behavior in one compact form.
Try the password suffix action and enter an incomplete email to inspect the floating label, inline error, and focus rule together.
Install the component directly into your codebase, then branch into v0 if you want to iterate on variations.
Install
Build with v0
Send the registry bundle into v0 when you want to explore new colorways, copy, or layout directions quickly.
Notes
Use Inputgroups for each field, then wrap several fields in InputGroup when you want the same vertical spacing across a compact form section.
"use client"; import { Eye, EyeOff, LockKeyhole, Mail, User2 } from "lucide-react";import { useState } from "react";import { InputGroup, Inputgroups } from "@/components/ui/input-group"; export function ContactFields() { const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [showPassword, setShowPassword] = useState(false); const emailError = email.length > 0 && !email.includes("@") ? "Enter a valid email address." : undefined; return ( <InputGroup className="max-w-xl"> <Inputgroups label="Full name" onChange={(event) => setName(event.target.value)} prefixIcon={<User2 aria-hidden className="size-5" />} value={name} /> <Inputgroups error={emailError} label="Work email" onChange={(event) => setEmail(event.target.value)} prefixIcon={<Mail aria-hidden className="size-5" />} type="email" value={email} /> <Inputgroups label="Password" prefixIcon={<LockKeyhole aria-hidden className="size-5" />} suffixIcon={ showPassword ? ( <EyeOff aria-hidden className="size-5" /> ) : ( <Eye aria-hidden className="size-5" /> ) } onSuffixClick={() => setShowPassword((current) => !current)} type={showPassword ? "text" : "password"} /> </InputGroup> );}Each item below covers the documented props and the behavior that matters during implementation.
7 props
stringstringReactNodeReactNode() => voidstringstringNotes
2 props
ReactNodestringNotes