Data
Redact
Hides amounts and other values from view, for a screen share or a café, behind a mask of the same width so nothing moves. Screen readers hear hidden value. Amount, Metric and RollingNumber already follow it; wrap anything else in Redact. Whether it is on is your app's state, passed to RedactProvider. It hides from view, not from the page: the values stay in the HTML, so it is no place for a secret.
Preview
- balance
hidden value
Up +7.4%vs August
account
number hidden valuelast paid hidden value
Installation
// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| hidden | boolean | - | On RedactProvider: the app's switch |
| label | string | "hidden value" | On Redact: what screen readers hear in its place |
| useRedacted() | boolean | - | True when a value here should draw a mask, for components of your own |