Component packs › Pressworks › Stop Button

Stop Button

A mushroom head that latches down for destructive actions and only lets go when you twist it, then pops back on its spring.

Stop Button is a button from Pressworks, a component pack with 8 buttons: Eight buttons, each a different real mechanism you can feel. Price: $2 for the whole pack.

Built with: push to latch, twist to release, keyboard twist.

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.

Stop Button props

PropTypeDefaultDescription
labelstringEngraved on the collar and used as the accessible name.
hintstringStatus line while latched.
stoppedbooleanStart latched down.
disabledboolean
onStop() => voidPushed and latched.
onRelease() => voidTwisted and released.
theme'light' | 'dark'
sizenumberScale factor. 1 = 240 × 214 px.
autoplaynumber | falseShowcase mode: pushes, then twists free, every N ms while visible.

Methods on the ref

Use it in React

import StopButton from './StopButton';

<StopButton />

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

More in Pressworks

Good for: Buttons.