All components
Chewypixel component

Password Input

A password field with a button that shows or hides what you typed. The eye icon swaps with a quick pop.

Installation

npx shadcn@latest add @chewypixel/password-input

Usage

import { Label } from "@/components/ui/label";
import { PasswordInput } from "@/components/ui/password-input";

export function PasswordField() {
  return (
    <div className="grid gap-2">
      <Label htmlFor="password">Password</Label>
      <PasswordInput id="password" autoComplete="current-password" />
    </div>
  );
}

Props

...props

Everything Input takes except type, which the toggle controls.

ComponentProps<typeof Input>

Released under the MIT License.

More components

See them in a real app

These components come from Mochi, our admin dashboard template built with Next.js, shadcn/ui and Motion.