Skip to content

pastetaste

Tandem Button

ButtonsInteractionAnimation

A call to action whose label and icon move together, in three motions: a knob floods the pill, a detached arrow chip is swallowed as the letters roll, or letters flicker in the accent as a plus turns.

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/tandem-button.tsx.

npx shadcn@latest add https://pastetaste.com/r/tandem-button.json

Prompt

Install the pastetaste component "Tandem Button" (tandem-button) into this Next.js project and use it.

What it is: A call to action whose label and icon move together, in three motions: a knob floods the pill, a detached arrow chip is swallowed as the letters roll, or letters flicker in the accent as a plus turns.

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/tandem-button.json
   (it writes components/pastetaste/tandem-button.tsx; install any npm packages it reports).
2. Import it: import { TandemButton } from "@/components/pastetaste/tandem-button" (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):
- children: string — The label. A plain string: letters are animated one by one and screen readers read the whole label once.
- effect: 'flood' | 'dock' | 'flicker' = 'dock' — flood: an accent knob spreads across the outlined pill. dock: the pill swallows a detached arrow chip and the letters roll. flicker: a squared box whose letters flash in the accent while the plus turns.
- icon: ReactNode = arrow (flood, dock) / plus (flicker) — Replaces the default icon; about 1.15em. In dock it is turned 45 degrees at rest.
- accent: string = var(--pt-accent, #dc3b0c) — The colour that moves. flood: knob and flood. dock: pill and chip. flicker: flashing letters and plus. The default passes 4.5:1 under white text.
- ink: string = var(--pt-ink, #161513) — flood: outline and resting label. flicker: label, plus and cell. Also the focus ring (dock uses the accent).
- surface: string = '#ffffff' / '#ffffff' / '#e5e1d8' — flood: the pill at rest and the label on the flood. dock: label and arrow on the accent. flicker: the box.
- size: 'sm' | 'md' | 'lg' | 'xl' = 'md' — Height 40, 48, 58 or 68 px; type, padding and the chip gap scale with it.
- active: boolean = false — Forces the engaged state, e.g. while the whole parent card is hovered. Pointer, keyboard focus and touch still engage it when false.
- href: string — Renders an <a> instead of a <button>; every other anchor or button attribute passes through.

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

Props 9

PropTypeDefaultDescription
childrenstring-The label. A plain string: letters are animated one by one and screen readers read the whole label once.
effect'flood' | 'dock' | 'flicker''dock'flood: an accent knob spreads across the outlined pill. dock: the pill swallows a detached arrow chip and the letters roll. flicker: a squared box whose letters flash in the accent while the plus turns.
iconReactNodearrow (flood, dock) / plus (flicker)Replaces the default icon; about 1.15em. In dock it is turned 45 degrees at rest.
accentstringvar(--pt-accent, #dc3b0c)The colour that moves. flood: knob and flood. dock: pill and chip. flicker: flashing letters and plus. The default passes 4.5:1 under white text.
inkstringvar(--pt-ink, #161513)flood: outline and resting label. flicker: label, plus and cell. Also the focus ring (dock uses the accent).
surfacestring'#ffffff' / '#ffffff' / '#e5e1d8'flood: the pill at rest and the label on the flood. dock: label and arrow on the accent. flicker: the box.
size'sm' | 'md' | 'lg' | 'xl''md'Height 40, 48, 58 or 68 px; type, padding and the chip gap scale with it.
activebooleanfalseForces the engaged state, e.g. while the whole parent card is hovered. Pointer, keyboard focus and touch still engage it when false.
hrefstring-Renders an <a> instead of a <button>; every other anchor or button attribute passes through.
View all →