Forms
Preview
01 Installation
Install
Pull Password Input from the barrel for everyday use, or the granular path when you want a tighter bundle.
tsxBarrel1 line
import { PasswordInput } from "@brika/clay";tsxGranular1 line
import { PasswordInput } from "@brika/clay/components/password-input"; 02 Usage
A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
tsxPassword Input.tsx10 lines
import { PasswordInput } from '@brika/clay/components/password-input';
/** Password field with lock icon and eye toggle to reveal characters. */
export default function PasswordInputDefaultDemo() {
return (
<div className="w-full max-w-xs">
<PasswordInput placeholder="Enter your password" />
</div>
);
} 03 Examples
Password Input, every way
04 Accessibility
Accessibility
- The reveal toggle carries
aria-labelthat updates between "Show password" and "Hide password". - The underlying input switches between
type="password"andtype="text", AT announces the mode change. -
aria-invalid="true"triggers the destructive ring; pair with a visible error message. - Autocomplete attributes like
autocomplete="current-password"improve password-manager integration.
05 API reference
API reference
Props specific to Password Input. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.