# Redact

> Redact

- Skill: `reaviz/redact` (Agent Skill)
- Install (CLI): `npx skillmds@latest add reaviz/redact`
- Raw SKILL.md: https://api.skillmd.com/api/skills/reaviz/redact/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: reaviz (https://skillmd.com/u/reaviz)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/reaviz/redact

---

# Redact

Masks sensitive content with a configurable character, keeping first and last characters visible. Click to toggle visibility.

## Import

```tsx
import { Redact } from 'reablocks';
```

## Redact Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `value` | `string` | — | Text to mask |
| `allowToggle` | `boolean` | `true` | Allow clicking to reveal/hide content |
| `compactLength` | `number` | `8` | Number of characters in masked output |
| `character` | `string` | `'*'` | Masking character |
| `tooltipText` | `string` | `'Click to toggle sensitive content'` | Hover title text |
| `className` | `string` | — | Additional CSS classes |
| `theme` | `RedactTheme` | — | Per-instance theme override |

## Basic Usage

```tsx
<Redact value="my-secret-api-key-12345" />
{/* Renders: "m******5" — click to toggle */}
```

## Non-Toggleable

```tsx
<Redact value="sensitive-data" allowToggle={false} />
{/* Always masked, not clickable */}
```

## Custom Masking

```tsx
<Redact value="secret" character="•" compactLength={6} />
{/* "s••••t" */}
```

## RedactTheme Interface

```typescript
interface RedactTheme {
  base: string;         // Base styles (cursor-text)
  interactive: string;  // Styles when allowToggle is true (cursor-pointer, hover:underline)
}
```

