Free
Pro

Password Input

A password field with a show/hide toggle. It is a ControlValueAccessor — bind formControlName, ngModel, or [formField] on base-password-input itself. Do not wrap it in another base-input-group.

freenew

Playground

HTML

<base-password-input label="Password" placeholder="••••••••" autocomplete="current-password">Password Input</base-password-input>

Basic Usage

Pass an optional label. Project base-error for validation. Set [showStrength] to include the meter.

Validation

Project base-error. The red border and message appear after the field is touched.

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add password-input

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add password-input
// Paths are relative to aliases.components (default: src/app/components)
import { PasswordInputComponent } from './password-input/password-input.component';

@Component({
  selector: 'app-your-component',
  imports: [
    PasswordInputComponent
  ],
  template: `...`
})
export class YourComponent {}

API for password-input — generated from JSDoc in the library source.

API reference for password-input
APIMemberTypeDefaultDescription
base-password-inputclassstring''Additional host CSS classes (merged via cn()).
base-password-inputlabelstring''
base-password-inputplaceholderunknown'••••••••'
base-password-inputautocompleteunknown'current-password'
base-password-inputnamestring''
base-password-inputshowStrengthbooleanfalse
base-password-inputdisabledbooleanfalse