Skip to content
Sign upGet access
MicrointeractionsRemember flightMenu

Remember flight (Pro)

ProIncluded in $99

Memories you can see being kept: the words tint, a slip of them arcs into the header's memory button, and the count rolls.

ProPick a fact to remember: the words tint, a slip of them arcs into the header's memory button, which turns purple, the count rolls and it says what it kept.

Saving a memory is usually a toast nobody reads. Here the exact words tint like a selection, a slip of them lifts out of the message and arcs into the memory button in the header. The button takes it with a small squeeze and turns memory's purple, the count rolls up, and for a moment it says what it kept before settling back to the count.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/remember-flight

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

tsx
import { flyToMemory, MemoryButton } from "@/components/ui/chatcn/pro/remember-flight"

const memory = React.useRef<HTMLButtonElement>(null)

async function remember(el: HTMLElement, text: string) {
  await flyToMemory(el, memory.current!, text)
  setCount((c) => c + 1)
  setSaved({ id: crypto.randomUUID(), text })
}

<MemoryButton ref={memory} count={count} saved={saved} />

Props

PropTypeNotes
countnumberSaved memories
saved{ id, text } | nullEach new value shows it for a moment
labelstringDefault "Memory"
showMsnumberHow long a new memory shows. Default 2400

flyToMemory(from, to, text) resolves when the slip lands, which is the moment to bump the count. Under reduced motion it resolves at once.

Accessibility

  • The button announces Saved to memory with the text, politely.
  • The slip is decorative and aria-hidden.

Motion

  • The slip uses the shared flySlip arc from chatcn-micro, 620 ms, on the compositor.
  • The count rolls with the Pro number flow; the label edits with the Pro text morph.