Warped Circle Transition

A wavy-perimeter circle reveal transition that wraps its children and animates a warped circular mask between content states keyed by transitionKey. It is a thin preset over the shared SDF blob transition with the "warped" variant and a 1120ms default duration.

Warped Circle Transition
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @smoothui/warped-circle-transition

Requires @smoothui in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { WarpedCircleTransition } from "@/components/smoothui/warped-circle-transition";<WarpedCircleTransition transitionKey={step}>  <div>{step === 1 ? "First view" : "Second view"}</div></WarpedCircleTransition>
  • Swapping between full-width sections, slides, or views where a playful organic reveal adds polish
  • Page or hero transitions that should feel more distinctive than a plain fade or slide
  • Triggering a visual change on a state update by changing transitionKey, with an onRest callback to run logic after the animation settles
  • Highlighting a key moment such as a successful action or a theme change with a striking shape-based reveal

Examples

Basic view swap

Changing transitionKey triggers the warped circle reveal between two views.

basic-view-swap.tsx
import { useState } from "react";import WarpedCircleTransition from "@/components/smoothui/warped-circle-transition";export default function Demo() {  const [isOn, setIsOn] = useState(false);  return (    <div>      <button onClick={() => setIsOn((v) => !v)}>Toggle</button>      <WarpedCircleTransition transitionKey={isOn ? "on" : "off"}>        <div className="p-8">{isOn ? "Enabled" : "Disabled"}</div>      </WarpedCircleTransition>    </div>  );}

Custom duration with onRest

A slower reveal that runs a callback once the animation has settled.

custom-duration-with-onrest.tsx
import { useState } from "react";import WarpedCircleTransition from "@/components/smoothui/warped-circle-transition";export default function Demo() {  const [page, setPage] = useState(0);  return (    <WarpedCircleTransition      transitionKey={page}      duration={1600}      onRest={() => console.log("settled on page", page)}      className="min-h-64"    >      <section className="p-8">Page {page}</section>    </WarpedCircleTransition>  );}

Step wizard

Advancing a multi-step flow with the reveal between steps.

step-wizard.tsx
import { useState } from "react";import WarpedCircleTransition from "@/components/smoothui/warped-circle-transition";const steps = ["Account", "Profile", "Done"];export default function Wizard() {  const [index, setIndex] = useState(0);  return (    <div>      <WarpedCircleTransition transitionKey={index}>        <h2 className="p-6 text-lg">{steps[index]}</h2>      </WarpedCircleTransition>      <button onClick={() => setIndex((i) => Math.min(i + 1, steps.length - 1))}>        Next      </button>    </div>  );}

API reference

PropTypeDefaultDescription
childrenReactNode—Content rendered inside the transition; revealed when transitionKey changes.
classNamestring—Optional class name applied to the transition container.
durationnumber1120Animation duration in milliseconds.
onRest() => void—Called when the transition animation has come to rest.
transitionKeystring | number—Key that triggers the transition when it changes. Required.

Accessibility

  • The transition is purely visual; ensure the revealed content is readable and reachable by keyboard and screen readers without relying on the animation.
  • When content changes, consider announcing the new view via an aria-live region, since the visual reveal alone is not announced.
  • Respect reduced-motion preferences by avoiding or shortening the transition in your app when the user has prefers-reduced-motion enabled, as this component does not expose a built-in toggle.
  • Avoid placing focus-critical controls that become hidden mid-transition; move focus to the new content after onRest fires.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Warped Circle Transition" component (smoothui/warped-circle-transition) from its shadcn registry.1. Install it with: npx shadcn@latest add @smoothui/warped-circle-transition2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: children, className, duration, onRest, transitionKey.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { WarpedCircleTransition } from "@/components/smoothui/warped-circle-transition";<WarpedCircleTransition transitionKey={step}>  <div>{step === 1 ? "First view" : "Second view"}</div></WarpedCircleTransition>```

Files & dependencies

  • index.tsx→ components/smoothui/warped-circle-transition/index.tsx
registryDependencieshttps://smoothui.dev/r/sdf-blob-transition.json

Looks similar, elsewhere