react-icons/ri#RiLockPasswordFill JavaScript Examples
The following examples show how to use
react-icons/ri#RiLockPasswordFill.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Forget.js From GitMarkonics with MIT License | 5 votes |
export default function Forget() {
return (
<>
<Navbar />
<div className="login">
<div className="login__container">
<div className="login__containerTop">
<div className="login__img"></div>
<p>Add a crisp to your bulky documents !!</p>
<h4>Welcome to the website</h4>
</div>
<div className="login__containerBottom">
<VStack className="input__container" w="65%" m="auto">
<Heading
fontSize="1.2rem"
color="blue.500"
fontWeight="semibold"
py={3}
>
FORGET PASSWORD
</Heading>
<InputGroup w="95%" borderRadius="full" bgColor="gray.200">
<InputLeftElement
margin="0 20px"
pointerEvents="none"
children={
<RiAccountPinBoxFill color="#C6C6E8" fontSize="2.1rem" />
}
/>
<Input required
borderRadius="full"
type="tel"
placeholder="Email Address"
paddingLeft="60px"
/>
</InputGroup>
<InputGroup
className="login__input"
w="95%"
borderRadius="full"
bgColor="gray.200"
>
<InputLeftElement
margin="0 20px"
pointerEvents="none"
children={
<RiLockPasswordFill color="#C6C6E8" fontSize="2.1rem" />
}
/>
<Input
type="tel" required
borderRadius="full"
placeholder="Password"
paddingLeft="60px"
/>
</InputGroup>
<HStack className="login__btn" alignSelf="flex-end">
<Button
colorScheme="pink"
px="6"
size="sm"
fontWeight="bold"
className="loginBtn"
>
SUBMIT
</Button>
<Link fontSize="sm" textDecoration="underline" color="blue">
<a href="/login" >Remember?</a>
</Link>
</HStack>
</VStack>
</div>
</div>
</div>
</>
)
}
Example #2
Source File: Login.js From GitMarkonics with MIT License | 5 votes |
function Login() {
return (
<>
<Navbar />
<div className="login">
<div className="login__container">
<div className="login__containerTop">
<div className="login__img"></div>
<p>Add a crisp to your bulky documents !!</p>
<h4>Welcome to the website</h4>
</div>
<div className="login__containerBottom">
<VStack className="input__container" w="65%" m="auto">
<Heading
fontSize="1.2rem"
color="blue.500"
fontWeight="semibold"
py={3}
>
USER LOGIN
</Heading>
<InputGroup w="95%" borderRadius="full" bgColor="gray.200">
<InputLeftElement
margin="0 20px"
pointerEvents="none"
children={
<RiAccountPinBoxFill color="#C6C6E8" fontSize="2.1rem" />
}
/>
<Input
borderRadius="full"
type="tel"
placeholder="Username"
paddingLeft="60px"
/>
</InputGroup>
<InputGroup
className="login__input"
w="95%"
borderRadius="full"
bgColor="gray.200"
>
<InputLeftElement
margin="0 20px"
pointerEvents="none"
children={
<RiLockPasswordFill color="#C6C6E8" fontSize="2.1rem" />
}
/>
<Input
type="password"
borderRadius="full"
placeholder="Password"
paddingLeft="60px"
/>
</InputGroup>
<Link fontSize="sm" textDecoration="underline" color="blue">
<a href="/register" >Need Account ?</a>
</Link>
<HStack className="login__btn" alignSelf="flex-end">
<Button
colorScheme="pink"
px="6"
size="sm"
fontWeight="bold"
className="loginBtn"
>
LOGIN
</Button>
<Link fontSize="sm" textDecoration="underline" color="blue">
<a href="/forget" >Forgot password?</a>
</Link>
</HStack>
</VStack>
</div>
</div>
</div>
</>
);
}
Example #3
Source File: Login.jsx From Next.js-Mongodb-Authentication-App with MIT License | 5 votes |
export default function Login() {
const router = useRouter();
const [errorMsg, setErrorMsg] = useState("");
const [user, { mutate }] = useUser();
const [loading, isLoading] = useState(false);
useEffect(() => {
// redirect to home if user is authenticated
if (user) router.replace("/");
}, [user]);
async function onSubmit(e) {
isLoading(true);
e.preventDefault();
const body = {
email: e.currentTarget.email.value,
password: e.currentTarget.password.value
};
const res = await fetch("/api/auth", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body)
});
if (res.status === 200) {
const userObj = await res.json();
mutate(userObj);
} else {
isLoading(false);
setErrorMsg("Incorrect username or password. Try again!");
}
}
return (
<>
<div className="card-form d-flex justify-content-center">
<form onSubmit={onSubmit}>
<div className="mb-3">
{errorMsg ? <p style={{ color: "red" }}>{errorMsg}</p> : null}
</div>
<div class="mb-3">
<label for="email" class="form-label"><MdEmail /> Email address</label>
<input type="email" class="form-control" id="email" required/>
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="password" class="form-label"><RiLockPasswordFill /> Password</label>
<input type="password" class="form-control" id="password" required/>
</div>
<div className="mb-3">
<p>New here? <Link href="/signup">Sign up</Link></p>
</div>
<button type="submit" class="btn btn-primary w-100">{loading ? <div class="spinner-border" role="status" style={{width:'1.5rem',height:'1.5rem'}}>
<span class="visually-hidden">Loading...</span>
</div> : <>Login</>}</button>
</form>
</div>
</>
);
}
Example #4
Source File: Signup.jsx From Next.js-Mongodb-Authentication-App with MIT License | 5 votes |
export default function Login() {
const [user, { mutate }] = useUser();
const [errorMsg, setErrorMsg] = useState("");
const [loading, isLoading] = useState(false);
useEffect(() => {
// redirect to home if user is authenticated
if (user) Router.replace("/");
}, [user]);
const handleSubmit = async (e) => {
e.preventDefault();
if (e.currentTarget.password.value !== e.currentTarget.cpassword.value) {
setErrorMsg("Passwords does not match")
} else {
isLoading(true);
const body = {
email: e.currentTarget.email.value,
name: e.currentTarget.name.value,
password: e.currentTarget.password.value
};
const res = await fetch("/api/users", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body)
});
if (res.status === 201) {
const userObj = await res.json();
// writing our user object to the state
mutate(userObj);
} else {
isLoading(false);
setErrorMsg(await res.text());
}
}
};
return (
<>
<div className="card-form d-flex justify-content-center">
<form onSubmit={handleSubmit}>
<div className="mb-3">
{errorMsg ? <p style={{ color: "red" }}>{errorMsg}</p> : null}
</div>
<div class="mb-3">
<label for="Name" class="form-label"><FaUserCircle /> Name</label>
<input type="text" class="form-control" id="name" required />
</div>
<div class="mb-3">
<label for="email" class="form-label"><MdEmail /> Email address</label>
<input type="email" class="form-control" id="email" required />
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="password" class="form-label"><RiLockPasswordFill /> Password</label>
<input type="password" class="form-control" id="password" required />
</div>
<div class="mb-3">
<label for="cpassword" class="form-label"><RiLockPasswordFill /> Confirm Password</label>
<input type="password" class="form-control" id="cpassword" required />
</div>
<div className="mb-3">
<p>Already registered ? <Link href="/login">Login</Link></p>
</div>
<button type="submit" class="btn btn-primary w-100 mb-3">{loading ? <div class="spinner-border" role="status" style={{ width: '1.5rem', height: '1.5rem' }}>
<span class="visually-hidden">Loading...</span>
</div> : <>Sign up</>}</button>
</form>
</div>
</>
);
}