snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
46
apps/v4/registry/new-york-v4/examples/input-group-text.tsx
Normal file
46
apps/v4/registry/new-york-v4/examples/input-group-text.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
InputGroup,
|
||||
InputGroupAddon,
|
||||
InputGroupInput,
|
||||
InputGroupText,
|
||||
InputGroupTextarea,
|
||||
} from "@/registry/new-york-v4/ui/input-group"
|
||||
|
||||
export default function InputGroupTextExample() {
|
||||
return (
|
||||
<div className="grid w-full max-w-sm gap-6">
|
||||
<InputGroup>
|
||||
<InputGroupAddon>
|
||||
<InputGroupText>$</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
<InputGroupInput placeholder="0.00" />
|
||||
<InputGroupAddon align="inline-end">
|
||||
<InputGroupText>USD</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
<InputGroup>
|
||||
<InputGroupAddon>
|
||||
<InputGroupText>https://</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
<InputGroupInput placeholder="example.com" className="pl-0.5!" />
|
||||
<InputGroupAddon align="inline-end">
|
||||
<InputGroupText>.com</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
<InputGroup>
|
||||
<InputGroupInput placeholder="Enter your username" />
|
||||
<InputGroupAddon align="inline-end">
|
||||
<InputGroupText>@company.com</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
<InputGroup>
|
||||
<InputGroupTextarea placeholder="Enter your message" />
|
||||
<InputGroupAddon align="block-end">
|
||||
<InputGroupText className="text-xs text-muted-foreground">
|
||||
120 characters left
|
||||
</InputGroupText>
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user