Skip to content

pastetaste

Refract Pane

CardsInteractionLayout

A panel of thick glass: the backdrop bends along the rim with a faint colour split, and a glint follows the pointer. SVG displacement filter, no WebGL.

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/refract-pane.tsx.

npx shadcn@latest add https://pastetaste.com/r/refract-pane.json

Prompt

Install the pastetaste component "Refract Pane" (refract-pane) into this Next.js project and use it.

What it is: A panel of thick glass: the backdrop bends along the rim with a faint colour split, and a glint follows the pointer. SVG displacement filter, no WebGL.

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/refract-pane.json
   (it writes components/pastetaste/refract-pane.tsx; install any npm packages it reports).
2. Import it: import { RefractPane } from "@/components/pastetaste/refract-pane" (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):
- radius: number = 28 — Corner radius in px.
- bezel: number = 28 — Width of the bending rim in px.
- strength: number = 40 — Maximum displacement at the very edge, in px.
- chroma: number = 0.35 — Colour split across the bend, 0 off to 1 strong.
- blur: number = 1.5 — Blur behind the glass in px.
- saturate: number = 1.3 — Saturation of what is seen through the glass.
- tint: string = 'rgba(255,255,255,0.07)' — Tint laid over the glass.
- glint: boolean = true — Specular glint that follows the pointer.

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

Props 8

PropTypeDefaultDescription
radiusnumber28Corner radius in px.
bezelnumber28Width of the bending rim in px.
strengthnumber40Maximum displacement at the very edge, in px.
chromanumber0.35Colour split across the bend, 0 off to 1 strong.
blurnumber1.5Blur behind the glass in px.
saturatenumber1.3Saturation of what is seen through the glass.
tintstring'rgba(255,255,255,0.07)'Tint laid over the glass.
glintbooleantrueSpecular glint that follows the pointer.
View all →