Forms · PasswordInput
SSR NativeAccessiblePassword Input
A labelled password field with an accessible visibility toggle.
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
| Prop | Type | Default | Description |
|---|---|---|---|
id* | string | — | Unique field identifier. |
label* | string | — | Visible field label. |
showLabel* | string | — | Accessible reveal action label. |
hideLabel* | string | — | Accessible conceal action label. |
description | string | — | Optional help text. |
error | string | — | Optional validation message. |
size | 'sm' | 'md' | 'lg' | 'md' | Sets control density. |
class | string | — | Additional classes forwarded to the rendered element. |
Accessibility
The toggle preserves the current value and announces its changing action.