About this set
Four solid buttons for dark pages, each with a different hover sweep. Diagonal shine sends a skewed band of white light across an indigo-to-purple gradient. Wipe fill slides a darker blue layer in from the left behind the label. Split open closes two rose halves in from the top and bottom over a near-black button. Gradient shift moves a wide green gradient to its other end over 0.6 seconds. Every effect is a pseudo-element or a background-position change inside an overflow-hidden button, and the fills sit behind the label because the button is isolated, so the text stays readable while they move. The sweeps also run on keyboard focus, not only on hover, so keyboard users see the same response. Use them for primary actions where a small moment of motion is wanted, such as a hero call to action or a pricing button. The blue, rose and green shades are chosen so every white label reaches 4.5:1 at rest and after the sweep. The Bootstrap version pins the .btn colours through –bs-btn-* variables and adds the pseudo-elements in a small stylesheet.
What’s included
- Diagonal shine, wipe fill, split open and gradient shift effects
- Effects run on hover and on keyboard focus
- Fills kept behind the label with isolation: isolate
- White labels at 4.5:1 before and after each sweep
- Transitions removed under prefers-reduced-motion
Accessibility
All four are native buttons named by their visible text, reachable with Tab and operated with Enter or Space. Focus draws a 2px light indigo outline outside the button and triggers the same sweep as hover. With prefers-reduced-motion set, the transitions are removed so the effects appear or disappear instantly.
Customise it
In plain CSS change the backgrounds on .sh-shine, .sh-wipe, .sh-split and .sh-shift and the sweep colours in their ::before and ::after rules. In Bootstrap the base colour is --sw-bg on each .btn-sweep-* class; in Tailwind edit the bg-, before:bg- and after:bg- utilities.

















