Stop snap (Pro)
ProIncluded in $99The end of a stopped answer, marked by what stopped it: the Stop button's square arcs to the end of the text and settles as the end mark.
On this page
While an answer streams this is the kit's square caret. Press Stop and the square on the Stop button lifts off, arcs to where the text broke off and lands on the caret with a small squash, then settles into a quiet gray end mark, with Stopped written in after it. The square that means writing, press to stop ends as the full stop of the answer it stopped. An answer that finishes on its own simply loses its caret.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { StopSnap } from "@/components/ui/chatcn/pro/stop-snap"
<p>
{text}
<StopSnap status={status} from={stopButtonRef} detail="214 tokens" />
</p>Put data-stop-square on the square inside your Stop button so the flight starts exactly there; without it the flight starts from the button's centre.
Props
| Prop | Type | Notes |
|---|---|---|
status | "streaming" | "stopped" | "done" | Done removes it |
from | RefObject<HTMLElement> | The Stop button |
label | string | Default "Stopped" |
detail | string | After the label, such as a token count |
Accessibility
- The Stopped note is a status, so a screen reader hears that the answer was cut short.
- The caret and the flying square are
aria-hidden.
Motion
- One 520 ms arc with a quarter turn, sampled into keyframes; the landing squash is 300 ms; the note is revealed with
clip-path. - Reduced motion: no flight, the note fades in.