Skip to content

pastetaste

Title Behind Ridge

HeroesTextAnimation

A landscape hero with the giant title between two copies of one photo: the front copy is clipped to the ridge so the letters stand behind the peaks, rise into place on load and sink with a slow zoom on scroll.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/title-behind-ridge.tsx.

npx shadcn@latest add https://pastetaste.com/r/title-behind-ridge.json
Dependenciesgsap@^3.15.0

Prompt

Install the pastetaste component "Title Behind Ridge" (title-behind-ridge) into this Next.js project and use it.

What it is: A landscape hero with the giant title between two copies of one photo: the front copy is clipped to the ridge so the letters stand behind the peaks, rise into place on load and sink with a slow zoom on scroll.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/title-behind-ridge.json
   (it writes components/pastetaste/title-behind-ridge.tsx; install any npm packages it reports: gsap@^3.15.0).
2. Import it: import { TitleBehindRidge } from "@/components/pastetaste/title-behind-ridge" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- src / alt / ratio: string / string / number = - / '' / 1.5 — The photograph and its width/height ratio. It is drawn twice.
- title: string — Title text. A '\n' becomes a line break that only shows on screens narrower than 760 px.
- ridge: string | [x, y][] — Foreground region (what stays in front of the letters): a CSS polygon() string or [x, y] pairs in percent of the photo; pairs are closed along the bottom automatically. SAMPLE_RIDGE is exported for the demo photo.
- height: string = '100svh' — Hero height (min 520 px).
- children: ReactNode — Content of the footer row (lead text and one pill button).
- titleTop / titleSize: number = 1.6 / 10.4 — Offset from the top and size of the title, in vw. Impact is wide: use about 15 for a condensed face.
- titleFont / titleColor / origin: string = Impact stack / #fff / '60% 22%' — Title font stack and colour, and the zoom's transform-origin.
- className / style: string / CSSProperties — On the root.

Live preview: https://pastetaste.com/c/title-behind-ridge
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 8

PropTypeDefaultDescription
src / alt / ratiostring / string / number- / '' / 1.5The photograph and its width/height ratio. It is drawn twice.
titlestring-Title text. A '\n' becomes a line break that only shows on screens narrower than 760 px.
ridgestring | [x, y][]-Foreground region (what stays in front of the letters): a CSS polygon() string or [x, y] pairs in percent of the photo; pairs are closed along the bottom automatically. SAMPLE_RIDGE is exported for the demo photo.
heightstring'100svh'Hero height (min 520 px).
childrenReactNode-Content of the footer row (lead text and one pill button).
titleTop / titleSizenumber1.6 / 10.4Offset from the top and size of the title, in vw. Impact is wide: use about 15 for a condensed face.
titleFont / titleColor / originstringImpact stack / #fff / '60% 22%'Title font stack and colour, and the zoom's transform-origin.
className / stylestring / CSSProperties-On the root.
View all →