Loop Flight Send Button

The pill folds into a circle, the paper plane launches right and writes a looping cursive trail around the button — holding in orbit while the request is pending — then glides back in from the left, folds into a check and the pill springs open to “Sent!”.

Try it: Click — the plane loops out and back; toggle slow network to watch it hold in orbit.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/loop-flight-send-button.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/loop-flight-send-button. You can also copy the source into components/ui/loop-flight-send-button.tsx (view on GitHub).

Usage

import { LoopFlightSendButton } from '@/components/ui/loop-flight-send-button'

Props

Component props
PropTypeDefaultNotes
label / sentLabel / errorLabelstring'Send' / 'Sent!' / 'Retry'Label per stage.
sendingLabelstring'Sending'Announced (and shown with reduced motion) while in flight.
onSend() => void | Promise<unknown>—Async work; the plane keeps looping until it settles. Rejecting lands a rose retry state.
resetAfternumber2400Auto-reset delay in ms (0 keeps the sent state).
trailbooleantrueDraw the tapered ink trail.
disabledbooleanfalseDisables the button.

Dependencies

  • motion

See all 24 Buttons components