ShadcnUI Vaults

Back to Blocks

Simple Login

Unknown Block

UnknownComponent

Simple Login

Clean and minimal login form with email, password, and remember me functionality.

Preview

Full width desktop view

Code

auth-1.tsx
1"use client";
2
3import { Button } from "@/components/ui/button";
4import { Input } from "@/components/ui/input";
5import { Label } from "@/components/ui/label";
6import {
7  Card,
8  CardContent,
9  CardDescription,
10  CardHeader,
11  CardTitle,
12} from "@/components/ui/card";
13import { Separator } from "@/components/ui/separator";
14import { Checkbox } from "@/components/ui/checkbox";
15import { Eye, EyeOff, Mail, Lock, ArrowRight } from "lucide-react";
16import { useState } from "react";
17
18export function LoginBlock1() {
19  const [showPassword, setShowPassword] = useState(false);
20  const [rememberMe] = useState(false);
21
22  return (
23    <section className="w-full min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted/20 p-4">
24      <Card className="w-full max-w-md border-2 shadow-xl">
25        <CardHeader className="space-y-4 text-center">
26          <div className="mx-auto w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center">
27            <Lock className="h-8 w-8 text-primary" />
28          </div>
29          <div className="space-y-2">
30            <CardTitle className="text-2xl font-bold">Welcome Back</CardTitle>
31            <CardDescription className="text-muted-foreground">
32              Sign in to your account to continue
33            </CardDescription>
34          </div>
35        </CardHeader>
36
37        <CardContent className="space-y-6">
38          <form className="space-y-4">
39            <div className="space-y-2">
40              <Label htmlFor="email">Email Address</Label>
41              <div className="relative">
42                <Mail className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
43                <Input
44                  id="email"
45                  type="email"
46                  placeholder="Enter your email"
47                  className="pl-10"
48                />
49              </div>
50            </div>
51
52            <div className="space-y-2">
53              <Label htmlFor="password">Password</Label>
54              <div className="relative">
55                <Lock className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
56                <Input
57                  id="password"
58                  type={showPassword ? "text" : "password"}
59                  placeholder="Enter your password"
60                  className="pl-10 pr-10"
61                />
62                <Button
63                  type="button"
64                  variant="ghost"
65                  size="icon"
66                  className="absolute right-0 top-0 h-full px-3 hover:bg-transparent"
67                  onClick={() => setShowPassword(!showPassword)}
68                >
69                  {showPassword ? (
70                    <EyeOff className="h-4 w-4 text-muted-foreground" />
71                  ) : (
72                    <Eye className="h-4 w-4 text-muted-foreground" />
73                  )}
74                </Button>
75              </div>
76            </div>
77
78            <div className="flex items-center justify-between">
79              <div className="flex items-center space-x-2">
80                <Checkbox id="remember" checked={rememberMe} />
81                <Label htmlFor="remember" className="text-sm">
82                  Remember me
83                </Label>
84              </div>
85              <Button variant="link" className="px-0 text-sm">
86                Forgot password?
87              </Button>
88            </div>
89
90            <Button type="submit" className="w-full gap-2">
91              Sign In
92              <ArrowRight className="h-4 w-4" />
93            </Button>
94          </form>
95
96          <div className="text-center text-sm text-muted-foreground">
97            Don't have an account?{" "}
98            <Button variant="link" className="px-0 font-medium">
99              Sign up
100            </Button>
101          </div>
102        </CardContent>
103      </Card>
104    </section>
105  );
106}

Dependencies

External Libraries

lucide-reactreact

Shadcn/UI Components

buttoncardcheckboxinputlabelseparator

LICENSE

MIT License

Copyright (c) 2025 Aldhaneka

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Shadcn Vaults Project (CC BY-NC 4.0 with Internal Use Exception)

All user-submitted components in the '/blocks' directory are licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0),
with the following clarification and exception:

You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material

Under these conditions:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial — You may NOT use the material for commercial redistribution, resale, or monetization.

🚫 You MAY NOT:
- Sell or redistribute the components individually or as part of a product (e.g. a UI kit, template marketplace, SaaS component library)
- Offer the components or derivative works in any paid tool, theme pack, or design system

✅ You MAY:
- Use the components in internal company tools, dashboards, or applications that are not sold as products
- Remix or adapt components for private or enterprise projects
- Use them in open-source non-commercial projects

This license encourages sharing, learning, and internal innovation — but prohibits using these components as a basis for monetized products.

Full license text: https://creativecommons.org/licenses/by-nc/4.0/

By submitting a component, contributors agree to these terms.

Contributors

Ramiro Godoy@milogodoy

Review Form Block

Aldhaneka@Aldhanekaa

Project Creator

For questions about licensing, please contact the project maintainers.