# Block Reveal Text

> A solid color block wipes across the headline, then pulls away to reveal the text underneath.

- Category: [CSS Text Effects](https://copy-css.com/category/text)
- Tags: wipe, clip-path, entrance, editorial, headline
- Live preview: https://copy-css.com/snippets/block-reveal-text
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<h2 class="text-wipe">New collection</h2>
```

## CSS

```css
.text-wipe {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #881337;
  font: 800 34px/1.15 system-ui, sans-serif;
  animation: text-wipe-text 1.2s steps(1, start) both;
}

.text-wipe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f43f5e;
  animation: text-wipe-block 1.2s cubic-bezier(0.7, 0, 0.3, 1) both;
}

@keyframes text-wipe-block {
  0% { clip-path: inset(0 100% 0 0); }
  50% { clip-path: inset(0); }
  100% { clip-path: inset(0 0 0 100%); }
}

@keyframes text-wipe-text {
  0%, 50% { color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .text-wipe,
  .text-wipe::after { animation: none; }

  .text-wipe::after { display: none; }
}
```

## Notes

- This CSS Block Reveal Text is 33 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses keyframe animations, clip paths and reduced-motion support.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
