Hazard
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-hazardAbout this component
A car dashboard hazard switch: the matte square with the double triangle latches down on a press, its lamp and the two indicator arrows beside it blink in step with a relay tick, and a second press pops it back out and goes dark.
- Dependencies
- None
- Difficulty
- Beginner
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- Click
- State change
- Glow
Techniques4
- CSS transition
- Keyframes
- clip-path
- SVG
Accessibility
Keyboard and screen readers
A native button named "Hazard lights" with aria-pressed.
Reduced motion
The lamps stay lit while on instead of blinking.
Use it in anything you build, commercial and client work included. Licence