Skip to content

pastetaste

Frame Dock Hero

HeroesMediaAnimation

A full-bleed hero photo that closes on scroll into a small portrait card with chamfered corners, while its overlay copy fades out; the docked card becomes a button.

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/frame-dock-hero.tsx.

npx shadcn@latest add https://pastetaste.com/r/frame-dock-hero.json

Prompt

Install the pastetaste component "Frame Dock Hero" (frame-dock-hero) into this Next.js project and use it.

What it is: A full-bleed hero photo that closes on scroll into a small portrait card with chamfered corners, while its overlay copy fades out; the docked card becomes a button.

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/frame-dock-hero.json
   (it writes components/pastetaste/frame-dock-hero.tsx; install any npm packages it reports).
2. Import it: import { FrameDockHero } from "@/components/pastetaste/frame-dock-hero" (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 / position: string — Hero photo, its alt text and CSS object-position.
- title: ReactNode — Giant overlay word at the bottom of the open hero.
- corners: { tl?, tr?, bl?, br?: ReactNode } — Small mono captions pinned to the corners while the hero is open.
- actions: ReactNode — Buttons next to the bottom caption.
- cardWidth / cardRatio: number = 348 / 1.333 — Docked card width in px and height over width.
- chamfer: number = 220 — Largest corner cut in px, reached halfway through the move.
- height: string = '240vh' — Scroll length of the section.
- cardLabel / onCardClick: string / () => void — Makes the docked card a labelled button.
- onProgress: (p: number) => void — Called with 0 to 1 as the card closes.

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

Props 9

PropTypeDefaultDescription
src / alt / positionstring-Hero photo, its alt text and CSS object-position.
titleReactNode-Giant overlay word at the bottom of the open hero.
corners{ tl?, tr?, bl?, br?: ReactNode }-Small mono captions pinned to the corners while the hero is open.
actionsReactNode-Buttons next to the bottom caption.
cardWidth / cardRationumber348 / 1.333Docked card width in px and height over width.
chamfernumber220Largest corner cut in px, reached halfway through the move.
heightstring'240vh'Scroll length of the section.
cardLabel / onCardClickstring / () => void-Makes the docked card a labelled button.
onProgress(p: number) => void-Called with 0 to 1 as the card closes.
View all →