Components/Password Input

Search documentation

Jump to any guide or component.

↑↓ move · Enter open · Esc close

Forms · PasswordInput

SSR NativeAccessible

Password Input

A labelled password field with an accessible visibility toggle.

Live previewv0.1.4

Keep this value private.

Astro
---
import { PasswordInput } from '@charvesta/cetha';
---

<PasswordInput id="secret" name="secret" label="API secret" showLabel="Show secret" hideLabel="Hide secret" />

API reference

PropTypeDefaultDescription
id*stringUnique field identifier.
label*stringVisible field label.
showLabel*stringAccessible reveal action label.
hideLabel*stringAccessible conceal action label.
descriptionstringOptional help text.
errorstringOptional validation message.
size'sm' | 'md' | 'lg''md'Sets control density.
classstringAdditional classes forwarded to the rendered element.

Accessibility

The toggle preserves the current value and announces its changing action.