Command Palette

Search for a command to run...

Password Input Primitive

Password Input provides a way for the user to securely enter a password, with the ability to toggle the visibility of the password.

Installation

pnpm dlx shadcn@latest add https://ui-x.junwen-k.dev/r/password-input-primitive.json

Anatomy

import * as PasswordInputPrimitive from "@/components/ui/password-input-primitive";
 
export default () => (
  <PasswordInputPrimitive.Root>
    <PasswordInputPrimitive.Input />
    <PasswordInputPrimitive.Toggle />
    <PasswordInputPrimitive.Indicator />
  </PasswordInputPrimitive.Root>
);

Examples

Default

Checkbox