Crosswalk
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-crosswalkAbout this component
A steel pedestrian push button on a pole: press it and WAIT lights with a slow tick, then the signal changes to the walking figure, blinks through its window and the unit resets. Pressing while it waits does nothing, as in life.
- Dependencies
- None
- Difficulty
- Intermediate
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- Click
- State change
- Glow
Techniques4
- State machine
- Keyframes
- SVG
- CSS transition
Accessibility
Keyboard and screen readers
A native button whose label changes with the phase (request, wait, walk) and is announced politely.
Reduced motion
The lamps switch without blinking.
Use it in anything you build, commercial and client work included. Licence