Ghost Word Hero
Place a cutout image in front of an oversized word, with a separate headline and call to action.
- Dependencies
- gsap
- Size
- 252 lines
- Controls
- 9 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/ghost-word-hero.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/ghost-word-hero.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the ghost-word-hero.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| word | string | "UNORDINARY" | Decorative backdrop word (aria-hidden), centred and never wrapped. |
| metaLeft / metaRight | string | — | Mono top row; the right side hides at 900px and below. |
| kicker / line1 / line2 | string | — | Headline; line 2 takes the accent and a ✳ superscript. |
| body / bodyTail | string | — | Aside paragraph (max 280px); bodyTail follows a line break that collapses on phones. |
| ctaLabel / ctaHref / exploreLabel / exploreHref | string | — | 210px accent pill and the secondary down-arrow link. Empty labels hide them. |
| artCaption / bottomLeft / bottomRight | string | — | Mono captions in the scene and the bottom bar. |
| image / imageAlt | string | "/media/chrome-hero/liquid-chrome.webp" | Cut-out object drawn with object-fit: contain over the word. Empty alt marks it decorative. |
| accent | string | "#e85002" | Accent line, status dot and CTA fill (hover mixes 14% white). |
| scrollMotion / parallax | boolean / number | true / 0.12 | Scrubbed art-layer parallax from 900 × 700 viewports; travel is ±(height × parallax × .35). |