snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
50
apps/v4/registry/new-york-v4/examples/input-group-label.tsx
Normal file
50
apps/v4/registry/new-york-v4/examples/input-group-label.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import { InfoIcon } from "lucide-react"
|
||||
|
||||
import {
|
||||
InputGroup,
|
||||
InputGroupAddon,
|
||||
InputGroupButton,
|
||||
InputGroupInput,
|
||||
} from "@/registry/new-york-v4/ui/input-group"
|
||||
import { Label } from "@/registry/new-york-v4/ui/label"
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/registry/new-york-v4/ui/tooltip"
|
||||
|
||||
export default function InputGroupLabel() {
|
||||
return (
|
||||
<div className="grid w-full max-w-sm gap-4">
|
||||
<InputGroup>
|
||||
<InputGroupInput id="email" placeholder="shadcn" />
|
||||
<InputGroupAddon>
|
||||
<Label htmlFor="email">@</Label>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
<InputGroup>
|
||||
<InputGroupInput id="email-2" placeholder="shadcn@vercel.com" />
|
||||
<InputGroupAddon align="block-start">
|
||||
<Label htmlFor="email-2" className="text-foreground">
|
||||
Email
|
||||
</Label>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<InputGroupButton
|
||||
variant="ghost"
|
||||
aria-label="Help"
|
||||
className="ml-auto rounded-full"
|
||||
size="icon-xs"
|
||||
>
|
||||
<InfoIcon />
|
||||
</InputGroupButton>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>We'll use this to send you notifications</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user