Password
nordaun-ui/passwordFreeBlock
A super simple password input component with a toggle options that hides or reveals your password.
Live preview
live · rendered by the registry
Rendered by @nordaun/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.nordaun.com/r/password.jsonSource
1"use client";23import * as React from "react";45import { Button } from "@/components/ui/button";6import {7 InputGroup,8 InputGroupAddon,9 InputGroupInput,10} from "@/components/ui/input-group";11import { Eye, EyeClosed } from "lucide-react";1213function Password({ className, ...props }: React.ComponentProps<"input">) {14 const [visible, setVisible] = React.useState<boolean>(false);1516 return (17 <InputGroup>18 <InputGroupInput19 type={visible ? "text" : "password"}20 {...props}21 className={className}22 />23 <InputGroupAddon align={"inline-end"}>24 <Button25 variant={"link"}26 type="button"27 onClick={() => setVisible(!visible)}28 >29 {visible ? <Eye /> : <EyeClosed />}30 </Button>31 </InputGroupAddon>32 </InputGroup>33 );34}3536export { Password };
What it pulls in
npm packages
Other registry items
Files it writes
More from @nordaun/ui
All 8 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Audioaudio | @nordaun/ui | Blocks | Free | 1 dep | |
| Filefile | @nordaun/ui | Blocks | Free | 1 dep · 3 files | |
| Flagflag | @nordaun/ui | Blocks | Free | no deps · 2 files | |
| Loadingloading | @nordaun/ui | Blocks | Free | no deps | |
| Mapmap | @nordaun/ui | Blocks | Free | 2 deps · 2 files | |
| Phonephone | @nordaun/ui | Blocks | Free | 2 deps · 3 files | |
| Videovideo | @nordaun/ui | Blocks | Free | 1 dep · 2 files |
