Component packs › Fastener › Velcro Dismiss

Velcro Dismiss

Drag the toast and the hooks stretch and let go one by one, so it resists, then tears free and flies; show() presses a new one on.

Velcro Dismiss is a toast from Fastener, a component pack with 6 fastener controls: Controls that fasten like clothing: zips that mesh, studs that snap, hook-and-loop that tears, buckles that click. Price: $2 for the whole pack.

Built with: hook-by-hook release, drag resistance, tear and fly.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Velcro Dismiss props

PropTypeDefaultDescription
titlestringToast title and text.
textstring
closeLabelstring"Dismiss"Accessible name of the close button. Default "Dismiss".
onDismiss() => void

Methods on the ref

Use it in React

import VelcroDismiss from './VelcroDismiss';

<VelcroDismiss />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Fastener

Good for: Buttons.