Bilingual Line Switch
A bilingual link aligns its translated label as the primary text underline animates.
A bilingual link aligns its translated label as the primary text underline animates.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<div class="tbx-1219"><a href="#demo-1219" class="tbx-1219-link"><span class="tbx-1219-en">OUR PHILOSOPHY</span><span class="tbx-1219-jp">Our approach <span aria-hidden="true">↗</span></span><span class="tbx-1219-line" aria-hidden="true"></span></a></div>
.tbx-1219{box-sizing:border-box;max-width:100%;overflow:visible}
.tbx-1219{display:grid;place-items:center;min-height:200px;width:100%;padding:22px;background:#efece8;font-family:Arial,sans-serif}.tbx-1219 *{box-sizing:border-box}.tbx-1219-link{position:relative;width:min(100%,300px);display:grid;gap:12px;padding:18px 9px 14px;color:#182e35;text-decoration:none;outline-offset:5px}.tbx-1219-en{font-family:Georgia,serif;font-size:21px;font-weight:700;letter-spacing:-.025em;transform:translateY(10px);transition:transform .4s}.tbx-1219-jp{display:flex;justify-content:space-between;align-items:center;font-size:11px;letter-spacing:.18em;opacity:.14;transform:translateY(11px);transition:transform .4s,opacity .4s}.tbx-1219-jp span{font-size:19px}.tbx-1219-line{height:2px;background:linear-gradient(90deg,#a85c4c 0 50%,#e1c5bb 50%);transform-origin:left;transform:scaleX(.25);transition:transform .48s}.tbx-1219-link:is(:hover,:focus-visible) .tbx-1219-en,.tbx-1219-link:is(:hover,:focus-visible) .tbx-1219-jp{transform:translateY(0)}.tbx-1219-link:is(:hover,:focus-visible) .tbx-1219-jp{opacity:1}.tbx-1219-link:is(:hover,:focus-visible) .tbx-1219-line{transform:scaleX(1)}.tbx-1219-link:focus-visible{outline:2px solid #a85c4c}
@media(prefers-reduced-motion:reduce){.tbx-1219 *, .tbx-1219 *::before,.tbx-1219 *::after{transition:none !important;animation:none !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 editorial layouts and international 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.