Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Components
  2. Secret
  3. API and Development

Secret

API and Development

View Source
Submit Issue

Secret renders a read-only Input showing a masked value. Default masking repeats bullets for all characters or keeps the last four visible when maskAllCharacters is false. Optional revealable toggles visibility via lead icon; the tail icon copies to clipboard and surfaces snackbar success or error feedback.

Props

Name

Type

Default

Description

value

string

—

The sensitive value to mask and optionally reveal.

id

string

—

HTML id attribute for the underlying input element.

label

string

—

Text label displayed above the secret input.

labelColor

LabelColor

—

Color variant for the label.

maskAllCharacters

boolean

true

When true, masks all characters. When false, reveals the last 4 characters.

revealable

boolean

false

When true, shows a reveal/hide toggle icon.

Storybook

Interactive examples and edge cases for this component are in Storybook.

Default
Revealable
Last Four Visible
Non Revealable
All States

Examples

The docs app mounts a single SnackbarManager in the shell so copy feedback works without nesting another manager.

Default

Revealable

Last four visible

Non-revealable

All states

Previous

Secret / Usage

Next

Secret / Accessibility

On this page

Props
Storybook
Examples
Default
Revealable
Last four visible
Non-revealable
All states