# Ghost Reveal

> A soft, feathered image reveal for React. Instead of a fade or a hard wipe, a tall cloudy alpha mask slides across the element via animated mask-position, so content bleeds in through a ghostly, feathered edge — like the image is forming out of fog. Zero dependencies (React only). Scroll-triggered once via IntersectionObserver by default, or drive it yourself with a controlled `play` prop. Reveals from any direction (up, down, left, right) using vertical and horizontal feather masks with no element rotation (so nothing clips), tunable softness (scale/mask-size), duration and CSS easing, an onHidden callback for swapping the child exactly when nothing is visible, and a graceful opacity fallback under prefers-reduced-motion.

- Author: [Arlan](https://21st.dev/@arlanoska)
- License: mit
- Tags: Image, Animation, Mask, Reveal, Scroll
- Live preview: https://21st.dev/@arlanoska/components/ghosty-reveal

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/arlanoska/ghosty-reveal?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/image.md
