Oath
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-oathAbout this component
A black lacquer pill with a gold hairline and gold lettering. Holding it down pours gold across from the left, turning the lettering black as it passes; when it reaches the far end it reads Confirmed. Let go early and it drains.
Triggers
- Click
- State change
- Fill
- Ambient
Techniques
- clip-path
- CSS transition
- State machine
- Keyframes
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native button whose aria-label changes from "Hold to confirm" to "Confirmed"; both drawn faces are aria-hidden. Holding Space or Enter confirms from the keyboard.
Reduced motion
The hold still takes 1.1 seconds, so a tap cannot confirm by accident.
Use it in anything you build, commercial and client work included. Licence