TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Directional Choice Menu

A directional icon rotates and a supporting label appears beside a selected service.

Live Demo

Hover over the element or use Tab to focus.

Source Code

Copy the HTML, CSS or JavaScript you need for your project.

HTML
<nav class="tbx-1298" aria-label="Our services"><span class="tbx-1298__title">WHAT WE DO</span><a href="#section"><b>Strategy</b><small>DISCOVER</small><i>↗</i></a><a href="#section"><b>Design</b><small>EXPLORE</small><i>↗</i></a><a href="#section"><b>Development</b><small>BUILD</small><i>↗</i></a></nav>
CSS
*{box-sizing:border-box}
.tbx-1298{width:300px;max-width:100%;height:166px;background:#142b35;color:#d5edf0;border-radius:9px;padding:13px 15px;font-family:system-ui,sans-serif}.tbx-1298__title{display:block;font-size:9px;letter-spacing:.2em;color:#87afb8;padding:0 0 7px}.tbx-1298 a{height:43px;display:flex;align-items:center;text-decoration:none;border-top:1px solid #46606a;color:inherit;gap:7px;transition:padding .3s}.tbx-1298 a b{flex:1;font-size:14px;font-weight:650;transition:color .3s}.tbx-1298 small{font-size:9px;letter-spacing:.09em;color:#d4c99f;opacity:0;transform:translateX(-8px);transition:opacity .3s,transform .3s}.tbx-1298 i{display:grid;place-items:center;border:1px solid #71909b;width:23px;height:23px;border-radius:100%;font-style:normal;font-size:14px;transition:transform .35s,color .35s,background .35s}.tbx-1298 a:hover,.tbx-1298 a:focus-visible{padding-left:8px}.tbx-1298 a:hover b,.tbx-1298 a:focus-visible b{color:#f3be76}.tbx-1298 a:hover small,.tbx-1298 a:focus-visible small{opacity:1;transform:translateX(0)}.tbx-1298 a:hover i,.tbx-1298 a:focus-visible i{transform:rotate(45deg);background:#e8b36b;color:#142b35}.tbx-1298 a:focus-visible{outline:2px solid #e8b36b;outline-offset:-1px}
@media (prefers-reduced-motion:reduce){.tbx-1298 *,.tbx-1298::before,.tbx-1298::after{animation:none!important;transition: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 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.