Dispatch Truck Button
Order pill stretches into a road; a parcel thumps onto a courier flatbed that drives off before a green confirmation pops in.
Try it: Click — parcel drops, courier drives off, order confirms.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/dispatch-truck-button.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/dispatch-truck-button. You can also copy the source into components/ui/dispatch-truck-button.tsx (view on GitHub).
Usage
import { DispatchTruckButton } from '@/components/ui/dispatch-truck-button'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
label | string | 'Place order' | Resting label. |
successLabel | string | 'On its way' | Label once the courier leaves. |
onOrder | () => void | Promise<unknown> | — | Async work; the van idles until it settles. Rejecting shows a retry state. |
resetAfter | number | 2600 | Auto-reset delay in ms (0 keeps success). |
Dependencies
motionlucide-react
Related Buttons components
- Drop-In Cart Button
Pill tucks into a cart, a box springs into the basket, the cart rolls away and back while the badge and counter pop.
- 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…
- Fill Progress Download Button
Arrow sinks away, a deeper blue floods the pill with a live percentage, then it condenses into a calm done chip.
- Neon Stroke Button
SVG stroke draws around on hover.
- Swallow Delete Button
Bin lid swings open on its hinge, the label’s letters arc inside, the lid snaps shut and a ring traces the receipt.
- Gravity Drop Button
Icon falls in with a bounce on hover.