mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 15:44:22 +00:00
62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
import { Button } from "@/examples/base/ui/button"
|
|
import {
|
|
Field,
|
|
FieldContent,
|
|
FieldDescription,
|
|
FieldGroup,
|
|
FieldLabel,
|
|
FieldLegend,
|
|
FieldSeparator,
|
|
FieldSet,
|
|
} from "@/examples/base/ui/field"
|
|
import { Input } from "@/examples/base/ui/input"
|
|
import { Textarea } from "@/examples/base/ui/textarea"
|
|
|
|
export default function FieldResponsive() {
|
|
return (
|
|
<div className="w-full max-w-4xl">
|
|
<form>
|
|
<FieldSet>
|
|
<FieldLegend>Profile</FieldLegend>
|
|
<FieldDescription>Fill in your profile information.</FieldDescription>
|
|
<FieldSeparator />
|
|
<FieldGroup>
|
|
<Field orientation="responsive">
|
|
<FieldContent>
|
|
<FieldLabel htmlFor="name">Name</FieldLabel>
|
|
<FieldDescription>
|
|
Provide your full name for identification
|
|
</FieldDescription>
|
|
</FieldContent>
|
|
<Input id="name" placeholder="Evil Rabbit" required />
|
|
</Field>
|
|
<FieldSeparator />
|
|
<Field orientation="responsive">
|
|
<FieldContent>
|
|
<FieldLabel htmlFor="lastName">Message</FieldLabel>
|
|
<FieldDescription>
|
|
You can write your message here. Keep it short, preferably
|
|
under 100 characters.
|
|
</FieldDescription>
|
|
</FieldContent>
|
|
<Textarea
|
|
id="message"
|
|
placeholder="Hello, world!"
|
|
required
|
|
className="min-h-[100px] resize-none sm:min-w-[300px]"
|
|
/>
|
|
</Field>
|
|
<FieldSeparator />
|
|
<Field orientation="responsive">
|
|
<Button type="submit">Submit</Button>
|
|
<Button type="button" variant="outline">
|
|
Cancel
|
|
</Button>
|
|
</Field>
|
|
</FieldGroup>
|
|
</FieldSet>
|
|
</form>
|
|
</div>
|
|
)
|
|
}
|