Compass Subnav Marker
A menu arrow turns into a small compass marker to identify the current section.
A menu arrow turns into a small compass marker to identify the current section.
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 class="tbx-1142" href="#company"><span class="tbx-1142__badge" aria-hidden="true"><i>↑</i></span><span class="tbx-1142__name"><small>ABOUT COMPANY</small><strong>View company information</strong></span><span class="tbx-1142__end" aria-hidden="true">01</span></a>
.tbx-1142{box-sizing:border-box;width:min(307px,100%);min-height:92px;display:flex;align-items:center;gap:14px;padding:14px 16px;text-decoration:none;font-family:system-ui,sans-serif;color:#344e62;background:#edf3f4;border:1px solid #bcccd3;border-radius:12px;transition:background .35s}
.tbx-1142__badge{width:57px;height:57px;flex:none;border:1px solid #7098a4;border-radius:50%;display:grid;place-items:center;position:relative;transition:background .4s}.tbx-1142__badge:before,.tbx-1142__badge:after{content:"";position:absolute;inset:7px;border:1px dashed #80a3ad;border-radius:50%;transition:transform .55s}.tbx-1142__badge:after{inset:19px;border-style:solid;border-color:#4a899a}.tbx-1142__badge i{z-index:1;font-size:25px;font-style:normal;transition:transform .55s}
.tbx-1142__name{display:grid;gap:7px}.tbx-1142__name small{font-size:9px;letter-spacing:.12em;font-weight:800;color:#7798a0}.tbx-1142__name strong{font-size:16px}.tbx-1142__end{margin-left:auto;align-self:flex-start;font-size:10px;color:#87a1a9}
.tbx-1142:is(:hover,:focus-visible){background:#ddebee}.tbx-1142:is(:hover,:focus-visible) .tbx-1142__badge:before{transform:rotate(90deg)}.tbx-1142:is(:hover,:focus-visible) .tbx-1142__badge i{transform:rotate(45deg)}.tbx-1142:is(:hover,:focus-visible) .tbx-1142__badge{background:#d6e6e8}.tbx-1142:focus-visible{outline:3px solid #6b9aab;outline-offset:4px}
@media (prefers-reduced-motion: reduce) { .tbx-1142, .tbx-1142 *, .tbx-1142::before, .tbx-1142::after, .tbx-1142 *::before, .tbx-1142 *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !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 navigation menus and company websites.
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.