
A single column form with labels stacked above each input and a clear submit action. Ideal for short flows like sign in, contact, or quick profile edits.
@shadcn-ui-blocks
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";
import { Textarea } from "@/components/ui/textarea";
export default function StackedForm() {
return (
<div className="container mx-auto px-4 md:px-6 2xl:max-w-[1400px] py-10">
<Card>
<CardHeader>
<CardTitle>Personal Information</CardTitle>
</CardHeader>
<CardContent>
<form>
<div className="space-y-8">
{/* Profile section */}
<div className="space-y-6">
<div className="space-y-2">
<Label htmlFor="name">Name</Label>
<Input id="name" placeholder="Enter your name" />
</div>
<div className="space-y-2">
<Label htmlFor="email">Email</Label>
<Input
id="email"
type="email"
placeholder="Enter your email"
/>
</div>
<div className="space-y-2">
<Label htmlFor="about">About</Label>
<Textarea
id="about"
placeholder="Write a few sentences about yourself"
/>
</div>
</div>
<Separator />
{/* Additional Details */}
<div className="space-y-6">
<div>
<h3 className="text-lg font-medium">Additional Details</h3>
<p className="text-sm text-muted-foreground">
Please provide any additional information.
</p>
</div>
<div className="space-y-2">
<Label htmlFor="company">Company</Label>
<Input id="company" placeholder="Your company name" />
</div>
<div className="space-y-2">
<Label htmlFor="role">Role</Label>
<Input id="role" placeholder="Your role" />
</div>
<div className="space-y-2">
<Label htmlFor="country">Country</Label>
<Input id="country" placeholder="Your country" />
</div>
</div>
<div className="flex justify-end">
<Button>Save Changes</Button>
</div>
</div>
</form>
</CardContent>
</Card>
</div>
);
}































