Wipe Swap

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-wipe-swap

About this component

On hover, the primary label slides out to the left while a secondary label simultaneously slides in from the right, both driven by the same translateX transition. Different from swap-text which moves vertically; this is a horizontal wipe with distinct label content. No dependencies.

Triggers

  • Hover

Techniques

  • Transform only

Difficulty

Beginner

Accessibility

Reduced motion

Remove the transition so the swap is instant.

Use it in anything you build, commercial and client work included. Licence

More buttons

See all
XP GainGet code
HaloGet code
BrickGet code
BuzzerGet code