Skip to content

pastetaste

Link Pulse

AnimationData

A pulse of light travelling along a curved connector between two nodes. For integration diagrams where direction matters; re-measures on resize.

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/link-pulse.tsx.

npx shadcn@latest add https://pastetaste.com/r/link-pulse.json

Prompt

Install the pastetaste component "Link Pulse" (link-pulse) into this Next.js project and use it.

What it is: A pulse of light travelling along a curved connector between two nodes. For integration diagrams where direction matters; re-measures on resize.

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/link-pulse.json
   (it writes components/pastetaste/link-pulse.tsx; install any npm packages it reports).
2. Import it: import { LinkPulse } from "@/components/pastetaste/link-pulse" (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):
- container: RefObject<HTMLElement | null> — The positioned ancestor the SVG is drawn into.
- from: RefObject<HTMLElement | null> — Start node; the curve begins at its centre.
- to: RefObject<HTMLElement | null> — End node; the curve ends at its centre.
- color: string = var(--pt-pulse, #2e63ff) — Pulse colour.
- curvature: number = 0.35 — 0 is straight, 1 a deep arc, negative bends the other way.
- duration: number = 2.6 — Seconds per trip along the link.
- width: number = 2 — Stroke width in px.
- reverse: boolean = false — Run the pulse from the end node towards the start node.
- children: ReactNode — Extra content rendered after the SVG, e.g. labels.
- className: string — Class on the SVG.
- style: CSSProperties — Inline style overrides on the SVG.

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

Props 11

PropTypeDefaultDescription
containerRefObject<HTMLElement | null>-The positioned ancestor the SVG is drawn into.
fromRefObject<HTMLElement | null>-Start node; the curve begins at its centre.
toRefObject<HTMLElement | null>-End node; the curve ends at its centre.
colorstringvar(--pt-pulse, #2e63ff)Pulse colour.
curvaturenumber0.350 is straight, 1 a deep arc, negative bends the other way.
durationnumber2.6Seconds per trip along the link.
widthnumber2Stroke width in px.
reversebooleanfalseRun the pulse from the end node towards the start node.
childrenReactNode-Extra content rendered after the SVG, e.g. labels.
classNamestring-Class on the SVG.
styleCSSProperties-Inline style overrides on the SVG.
View all →