BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/formcn/password

Password

formcn/password
FreeComponent

Password input with show/hide toggle

Install it

npx shadcn@latest add https://formcn.dev/r/password.json

Source

src/components/password.tsxformcn.dev/r/password.json
1import { EyeIcon, EyeOffIcon } from 'lucide-react'
2import { useState } from 'react'
3import {
4 InputGroup,
5 InputGroupAddon,
6 InputGroupButton,
7 InputGroupInput,
8} from '@/components/ui/input-group'
9
10export function Password(props: React.ComponentProps<typeof InputGroupInput>) {
11 const [isVisible, setIsVisible] = useState<boolean>(false)
12
13 const toggleVisibility = () => setIsVisible((prevState) => !prevState)
14
15 return (
16 <InputGroup>
17 <InputGroupInput
18 placeholder="password"
19 type={isVisible ? 'text' : 'password'}
20 {...props}
21 />
22 <InputGroupAddon align="inline-end">
23 <InputGroupButton onClick={toggleVisibility}>
24 {isVisible ? (
25 <EyeOffIcon size={16} aria-hidden="true" />
26 ) : (
27 <EyeIcon size={16} aria-hidden="true" />
28 )}
29 </InputGroupButton>
30 </InputGroupAddon>
31 </InputGroup>
32 )
33}

What it pulls in

Other registry items

  • input-group

Files it writes

  • src/components/password.tsx

Facts

Registry
formcn
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

formcn.dev alibey-10/formcn on GitHub Raw registry item This item as JSON

More from formcn

All 9 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
File Inputfile-uploadformcnComponentsFreeno deps
Multi-selectmulti-selectformcnComponentsFreeno deps
Multi-step formmulti-step-viewerformcnComponentsFree1 dep
RatingratingformcnComponentsFreeno deps
StepperstepperformcnComponentsFreeno deps
Tag Inputtag-inputformcnComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex