Password Input
GitHubPassword input with a toggle that shows or hides the entered value.
Installation
bash
pnpm dlx shadcn@latest add @cs/password-inputUsage
tsx
import { PasswordInput } from "@/components/cs/password-input";tsx
<PasswordInput label="Password" name="password" autoComplete="current-password" />API Reference
PasswordInput
Password input with a toggle that shows or hides the entered value.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| error | string | null | undefined | - | Validation error message for the field. |
| hideLabel | string | "Passwort verbergen" | Accessible label for the hide-password control. |
| icon | ReactNode | <Lock /> | Icon displayed inside the input on the left. |
| inputClassName | string | undefined | - | Additional classes applied to the native input control. |
| label | ReactNode | - | Field label and fallback placeholder. |
| orientation | "vertical" | "horizontal" | "responsive" | null | undefined | - | Layout of the field label and input control. |
| showLabel | string | "Passwort anzeigen" | Accessible label for the show-password control. |