Simple Login Form
Single-card login form with email and password only. Good default for internal tools where there is no social auth to wire up.
Live preview
open in new tab ↗import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Field, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function LoginForm({ className, ...props }) {
return (
<div className={className} {...props}>
<Card>
<CardHeader>
<CardTitle>Log in to your account</CardTitle>
<CardDescription>Enter your email below to log in</CardDescription>
</CardHeader>
<CardContent>
<form>
<FieldGroup>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" type="email" placeholder="you@example.com" required />
</Field>
<Field>
<div className="flex items-center">
<FieldLabel htmlFor="password">Password</FieldLabel>
<a href="#" className="ml-auto text-sm underline-offset-4 hover:underline">Forgot your password?</a>
</div>
<Input id="password" type="password" required />
</Field>
<Field>
<Button type="submit">Log in</Button>
<Button variant="outline" type="button">Log in with Google</Button>
<FieldDescription className="text-center">
Don't have an account? <a href="#">Sign up</a>
</FieldDescription>
</Field>
</FieldGroup>
</form>
</CardContent>
</Card>
</div>
)
}Block id: shadcn-login-01react-tailwind · swap-content
More form blocks
Want the whole site, not just the block?
We ship real client sites in 3 weeks — with blocks like this one, wired to your brand.



