Skip to content

pastetaste

Explore Widget

CardsMediaNavigation

A discovery widget in three rounded modules that change scene together: the photo wipes in while prompt, title, glyph and caption roll over. Arrow, swipe or keys; a corner button that grows into live search; save.

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/explore-widget.tsx.

npx shadcn@latest add https://pastetaste.com/r/explore-widget.json
Dependenciesmotion@^12.23.0

Prompt

Install the pastetaste component "Explore Widget" (explore-widget) into this Next.js project and use it.

What it is: A discovery widget in three rounded modules that change scene together: the photo wipes in while prompt, title, glyph and caption roll over. Arrow, swipe or keys; a corner button that grows into live search; save.

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/explore-widget.json
   (it writes components/pastetaste/explore-widget.tsx; install any npm packages it reports: motion@^12.23.0).
2. Import it: import { ExploreWidget } from "@/components/pastetaste/explore-widget" (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):
- scenes: ExploreScene[] — Scenes in order, looping: { id, title, image, alt?, position?, prompt?, caption?, place?, coords?, tone?, icon?, keywords? }. tone is the solid colour of the search button for that photo.
- index / defaultIndex: number / number = — / 0 — Current scene, controlled or uncontrolled.
- onIndexChange: (index: number, scene: ExploreScene) => void — Called on every scene change: arrow, swipe, keys, search preview or auto-advance.
- saved / defaultSaved: string[] / string[] = — / [] — Saved scene ids, controlled or uncontrolled; the plus shows a check for saved scenes.
- onSavedChange: (ids: string[], scene: ExploreScene, saved: boolean) => void — Called with the new list when the plus is pressed.
- onOpen: (scene: ExploreScene) => void — Called on a click (not a swipe) or Enter on the photo; the photo gets a pointer cursor.
- autoPlay: number = 0 — Seconds per scene; 0 is off. A hairline under the arrow fills as the timer; it pauses on hover, keyboard focus, open search, off-screen and hidden tabs. Off under reduced motion.
- search / searchPlaceholder: boolean / string = true / 'Search places' — The corner button that grows into a search field; typing previews the best match, Enter keeps it, Escape goes back.
- label: string = 'Places' — Accessible name of the carousel; also the prompt for scenes without one.
- counter: boolean = false — Show 01 / 05 in the photo's top corner, with a soft scrim behind it.
- accent / tile: string / string = '#ef8a2f' / '#101012' — Colour of the save button and of the glyph tile (also --pt-explore-accent, --pt-explore-tile).
- className / style: string / CSSProperties — Passed to the root; set --pt-explore-width (default 520px) to size it.

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

Props 12

PropTypeDefaultDescription
scenesExploreScene[]-Scenes in order, looping: { id, title, image, alt?, position?, prompt?, caption?, place?, coords?, tone?, icon?, keywords? }. tone is the solid colour of the search button for that photo.
index / defaultIndexnumber / number— / 0Current scene, controlled or uncontrolled.
onIndexChange(index: number, scene: ExploreScene) => void-Called on every scene change: arrow, swipe, keys, search preview or auto-advance.
saved / defaultSavedstring[] / string[]— / []Saved scene ids, controlled or uncontrolled; the plus shows a check for saved scenes.
onSavedChange(ids: string[], scene: ExploreScene, saved: boolean) => void-Called with the new list when the plus is pressed.
onOpen(scene: ExploreScene) => void-Called on a click (not a swipe) or Enter on the photo; the photo gets a pointer cursor.
autoPlaynumber0Seconds per scene; 0 is off. A hairline under the arrow fills as the timer; it pauses on hover, keyboard focus, open search, off-screen and hidden tabs. Off under reduced motion.
search / searchPlaceholderboolean / stringtrue / 'Search places'The corner button that grows into a search field; typing previews the best match, Enter keeps it, Escape goes back.
labelstring'Places'Accessible name of the carousel; also the prompt for scenes without one.
counterbooleanfalseShow 01 / 05 in the photo's top corner, with a soft scrim behind it.
accent / tilestring / string'#ef8a2f' / '#101012'Colour of the save button and of the glyph tile (also --pt-explore-accent, --pt-explore-tile).
className / stylestring / CSSProperties-Passed to the root; set --pt-explore-width (default 520px) to size it.
View all →