Route Line Story Card
A route line connects two destinations on a travel card and highlights the arrival point.
A route line connects two destinations on a travel card and highlights the arrival point.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<a href="#route" class="tbx-1115"><span class="tbx-1115__heading"><small>LOCAL JOURNEY / 02</small><b aria-hidden="true">↗</b></span><strong>A short journey connecting cities.</strong><span class="tbx-1115__route"><span class="tbx-1115__stop"><i></i>START</span><span class="tbx-1115__line"><em></em></span><span class="tbx-1115__stop tbx-1115__stop--end"><i></i>DESTINATION</span></span><span class="tbx-1115__foot">See suggested route</span></a>
.tbx-1115{width:min(287px,100%);display:flex;flex-direction:column;gap:17px;padding:18px;border:1px solid #cbd9d4;border-radius:11px;background:#e9f0eb;color:#345249;text-decoration:none;font-family:system-ui,sans-serif;transition:background .35s}
.tbx-1115__heading{display:flex;justify-content:space-between;align-items:center}.tbx-1115 small{font-size:9px;font-weight:800;letter-spacing:.08em;color:#709187}.tbx-1115__heading b{font-size:21px;font-weight:350;transition:transform .35s}.tbx-1115 strong{font-size:15px;white-space:nowrap}.tbx-1115__route{display:flex;align-items:center;gap:4px}.tbx-1115__stop{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:8px;font-weight:900;letter-spacing:.05em}.tbx-1115__stop i{width:16px;height:16px;border:3px solid #4c8272;border-radius:50%;background:#e9f0eb;transition:background .3s,box-shadow .3s}.tbx-1115__line{flex:1;height:3px;background:#d0dbd7;overflow:hidden;border-radius:9px;transform:translateY(-8px)}.tbx-1115__line em{display:block;width:100%;height:100%;background:#dc946b;transform:scaleX(0);transform-origin:left;transition:transform .55s cubic-bezier(.2,.8,.2,1)}.tbx-1115__foot{font-size:10px;font-weight:700;color:#588072}
.tbx-1115:is(:hover,:focus-visible){background:#dcebe4}.tbx-1115:is(:hover,:focus-visible) .tbx-1115__line em{transform:scaleX(1)}.tbx-1115:is(:hover,:focus-visible) .tbx-1115__stop--end i{background:#dc946b;box-shadow:0 0 0 5px #dc946b44}.tbx-1115:is(:hover,:focus-visible) .tbx-1115__heading b{transform:translate(3px,-3px)}
.tbx-1115:focus-visible{outline:3px solid #dc946b;outline-offset:4px}@media(prefers-reduced-motion:reduce){.tbx-1115 *{transition:none!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 travel sections and service pages.
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.