Skip to content
Sign upGet access
MicrointeractionsRedact sweepMenu

Redact sweep (Pro)

ProIncluded in $99

Redaction you watch happen: a marker bar sweeps across each sensitive span and you can hold to peek.

ProA marker bar sweeps across each sensitive span in reading order and leaves a bar that still says what it hid; press and hold to peek.

When the text is redacted a marker bar sweeps across each sensitive span in reading order, laying ink over it like a pen stroke, and the span becomes a dark bar that still says what it hid. Press and hold a bar to peek: the ink draws back while you hold. Covered text cannot be read or copied.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/redact-sweep

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { RedactSweep } from "@/components/ui/chatcn/pro/redact-sweep"

<RedactSweep parts={["Card ", { secret: "4417 2210 9981 4417", label: "card number" }]} redacted={hide} />

Props

PropTypeNotes
parts(string | { secret, label })[]
redactedbooleanTurning it on plays the sweep
peekbooleanHold to peek. Default true

Keyboard

KeyAction
Space / Enter heldPeek at the focused span

Accessibility

  • Covered spans read as Hidden card number; with peek they are buttons labelled Hold to peek.

Motion

  • A clip-path wipe per span, 360 ms, 140 ms apart. Reduced motion: they cover at once.