mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 14:08:47 +00:00
* feat: add base and radix docs * feat: transform code for display * fix * fix * fix * fix * fix * chore: remove claude files * fix * fix * fix * chore: run format:write * fix * feat: add more examples * fix * feat: add aspect-ratio * feat: add avatar * feat: add badge * feat: add breadcrumb * fix * feat: add button * fix * fix * fix * feat: add calendar and card * feat: add carousel * fix: chart * feat: add checkbox * feat: add collapsible * feat: add combobox * feat: add command * feat: add context menu * feat: add data-table dialog and drawer * feat: dropdown-menu * feat: add date-picker * feat: add empty * feat: add field and hover-card * fix: input * feat: add input * feat: add input-group * feat: add input-otp * feat: add item * feat: add kbd and label * feat: add menubar * feat: add native-select * feat: add more components * feat: more components * feat: more components * feat: add skeleton, slider and sonner * feat: add spinner and switch * feat: add more components * fix: tabs * fix: tabs * feat: add docs for sidebar * fix * fix * fi * docs: update * fix: create page * fix * fix * chore: add changelog * fix
79 lines
2.4 KiB
TypeScript
79 lines
2.4 KiB
TypeScript
import { Button } from "@/examples/base/ui/button"
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/examples/base/ui/card"
|
|
import { Field, FieldGroup, FieldLabel } from "@/examples/base/ui/field"
|
|
import { Input } from "@/examples/base/ui/input"
|
|
import {
|
|
InputGroup,
|
|
InputGroupAddon,
|
|
InputGroupInput,
|
|
InputGroupText,
|
|
InputGroupTextarea,
|
|
} from "@/examples/base/ui/input-group"
|
|
import { ExternalLinkIcon, MailIcon } from "lucide-react"
|
|
|
|
export function InputGroupInCard() {
|
|
return (
|
|
<Card className="w-full">
|
|
<CardHeader>
|
|
<CardTitle>Card with Input Group</CardTitle>
|
|
<CardDescription>This is a card with an input group.</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<FieldGroup>
|
|
<Field>
|
|
<FieldLabel htmlFor="email-input">Email Address</FieldLabel>
|
|
<InputGroup>
|
|
<InputGroupInput
|
|
id="email-input"
|
|
type="email"
|
|
placeholder="you@example.com"
|
|
/>
|
|
<InputGroupAddon align="inline-end">
|
|
<MailIcon />
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="website-input">Website URL</FieldLabel>
|
|
<InputGroup>
|
|
<InputGroupAddon>
|
|
<InputGroupText>https://</InputGroupText>
|
|
</InputGroupAddon>
|
|
<InputGroupInput id="website-input" placeholder="example.com" />
|
|
<InputGroupAddon align="inline-end">
|
|
<ExternalLinkIcon />
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</Field>
|
|
<Field>
|
|
<FieldLabel htmlFor="feedback-textarea">
|
|
Feedback & Comments
|
|
</FieldLabel>
|
|
<InputGroup>
|
|
<InputGroupTextarea
|
|
id="feedback-textarea"
|
|
placeholder="Share your thoughts..."
|
|
className="min-h-[100px]"
|
|
/>
|
|
<InputGroupAddon align="block-end">
|
|
<InputGroupText>0/500 characters</InputGroupText>
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</Field>
|
|
</FieldGroup>
|
|
</CardContent>
|
|
<CardFooter className="justify-end gap-2">
|
|
<Button variant="outline">Cancel</Button>
|
|
<Button>Submit</Button>
|
|
</CardFooter>
|
|
</Card>
|
|
)
|
|
}
|