Slide Button
A button whose label swaps on hover: every letter slides out of its own little mask while a copy of it slides in from the other side, so the whole word turns over in one move. It plays back when the pointer leaves.
Slide Button is a Free widget: it works as soon as the companion plugin is installed.
Requires: no animation library, and no JavaScript at all. The letters are written by the server and the motion is a CSS transition.
Where to find it#
| How | Where |
|---|---|
| As an element | Elements panel › Bricksify › Slide Button |
| As a control group | Slide Button (Bricksify) on Button and Text Link. Set Animation type to Letter slide and the other settings appear. |
The control group keeps everything else about your Button or Text Link: its style, link and classes. See How widgets work.
Settings#
| Setting | Options and default | What it does |
|---|---|---|
| Text (element only) | Default About me. Dynamic data works. | The label. |
| Link (element only) | Empty by default. | With a link the element is a link. Without one it is a <button type="button">. |
| Animation type (control group only) | Letter slide. Default None. | Switches the effect on for that element. |
| Direction | To the right (default), To the left, Up, Down | Which way the letters leave. The copy comes in from the opposite side. |
| Duration (s) | Default 0.9 | How long the swap takes. |
| Stagger (s) | Default 0 | 0 moves every letter together, like the original. A small value, such as 0.02, makes them follow one another. |
| Icon | Slides with the letters (default), Appears on hover, Stays still | Only when the Button or Text Link has an icon (any icon library or SVG). Slides with the letters: the icon has its own mask and swaps like a letter. Appears on hover: the icon is hidden at rest and fades in from 4px on the left in 0.2s while the letters swap. Stays still: the icon does not move. |
The curve is the original's and not in the panel. If you need a different one, set the custom property --bxsb-ease on the element in your own CSS, for example %root% { --bxsb-ease: ease-in-out; }.
How it behaves#
- It plays on hover, and on keyboard focus, so someone tabbing through the page sees the same swap.
- When the pointer leaves, the swap reverses from wherever it has got to, so a quick pass over the button never jumps.
- The label is split into letters on the server, before the page reaches the browser. Nothing reflows or shifts while the page loads.
- The label stays on one line.
- Only text is split into letters. An icon moves as one piece, following the Icon setting; other tags inside the label (a span, a strong) are kept in both copies.
- The space between icon and text is the button's own Gap (Bricks default 10px), and the icon position (left or right) set on the Button or Text Link is respected. The letters themselves never get a gap.
- Screen readers read the label once. The two moving copies are hidden from them.
- In the builder the element shows a plain, editable label. The letters slide on the front end.
- Do not combine it with Text Roll, Letter Drop or Draw Underline on the same element.
Reduced motion and without JavaScript#
For a visitor who has asked for reduced motion, the label still changes on hover, but at once, with no sliding.
JavaScript makes no difference: the widget never uses it.
Used in#
About Swarm, About Company Profile, About Agency Story, Footer Trial Banner, Footer Mega Contact, Pricing Partner Tiers, Pricing Radar Plans and Pricing Commitment Term use Slide Button through the control group on a native Button or Text Link, so the templates still paste as ordinary Bricks structure. The three Pricing templates use Icon: Appears on hover.