Follow
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-followAbout this component
A follow button as a neon sign: a dark plate with a pink glass tube bent round it. Pressing it strikes the tube over to mint with a flicker, the plus turns into a tick and the word becomes Following. Press again to unfollow.
Triggers
- Click
- State change
- Neon
- Icon swap
Techniques
- CSS variables
- Keyframes
- stroke-dashoffset
- CSS transition
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
A native toggle button with aria-pressed; the visible word (Follow or Following) is its name and the other word is hidden.
Reduced motion
The colours and word change without the flicker.
Use it in anything you build, commercial and client work included. Licence