MaskedField
MaskedField — Prism component.
Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggleWhen to use
MaskedField — Prism component.
Accessibility
Masked values stay obscured to assistive tech until revealed; the reveal toggle is a labelled button. Audit entries are an ordered list.
Import
const { MaskedField } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
value | string | number | Yes | The sensitive value to display (string or number). |
label | React.ReactNode | — | Optional caption above the value. |
visibleChars | number | — | How many trailing characters stay visible when masked. Default 4. |
maskChar | string | — | Character used for the mask. Default "•". |
revealable | boolean | — | Show the reveal/hide toggle. Default true. |
copyable | boolean | — | Show a copy-to-clipboard button. Default false. |
defaultRevealed | boolean | — | Start revealed. Default false. |
className | string | — |