Sliding Latch CTA
A two-stage sliding latch opens within a button for member access or booking actions.
A two-stage sliding latch opens within a button for member access or booking actions.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<button class="tbx-1193" type="button"><span class="tbx-1193__copy"><small>MEMBER ACCESS</small><strong>Member area</strong></span><span class="tbx-1193__lock" aria-hidden="true"><i></i><b>➜</b></span></button>
.tbx-1193{display:flex;align-items:center;justify-content:space-between;gap:12px;width:245px;max-width:100%;height:78px;padding:13px 14px 13px 21px;background:#163949;color:white;border:0;border-radius:9px;cursor:pointer;font-family:system-ui;box-shadow:0 10px 20px #15334422;transition:background .3s,transform .3s}
.tbx-1193__copy{text-align:left;display:grid;gap:4px}.tbx-1193__copy small{font-size:9px;letter-spacing:.15em;color:#97d8d2}.tbx-1193__copy strong{font-size:16px}.tbx-1193__lock{height:45px;width:54px;border:1px solid #88c3c2;border-radius:6px;display:grid;place-items:center;position:relative;overflow:hidden}.tbx-1193__lock i{position:absolute;top:7px;right:9px;width:19px;height:7px;border:3px solid #8bccc1;border-bottom:0;border-radius:10px 10px 0 0;transform:translateX(0);transition:transform .38s}.tbx-1193__lock b{font-size:24px;transform:translateY(11px);opacity:.35;transition:transform .38s,opacity .38s}.tbx-1193:is(:hover,:focus-visible){background:#0d6171;transform:translateY(-2px)}.tbx-1193:is(:hover,:focus-visible) .tbx-1193__lock i{transform:translateX(15px)}.tbx-1193:is(:hover,:focus-visible) .tbx-1193__lock b{transform:translateY(1px);opacity:1}.tbx-1193:focus-visible{outline:3px solid #f8bc62;outline-offset:3px}
@media (prefers-reduced-motion: reduce) {.tbx-1193,.tbx-1193 *,.tbx-1193::before,.tbx-1193::after,.tbx-1193 *::before,.tbx-1193 *::after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}}
How to Use
Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.
Use Case
Useful for calls to action and membership sections.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile: Ensure the interactive content remains accessible without hover on touch devices.
Browser: Uses modern CSS. Check behavior in the browsers you support.
Reduced Motion: Check that prefers-reduced-motion is respected.