TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Link Bracket Reveal

Small brackets appear on either side of a label, emphasizing a text-only link.

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
<button class="tbx-1028" type="button"><span aria-hidden="true" class="tbx-1028__br">[</span><span>About us</span><span aria-hidden="true" class="tbx-1028__br">]</span></button>
CSS
.tbx-1028{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;background:transparent;padding:10px 6px;color:#1f4564;font:700 17px/1.5 system-ui,sans-serif;cursor:pointer}
.tbx-1028__br{color:#d0775d;opacity:0;transition:opacity .27s ease,transform .27s ease;font-weight:900}
.tbx-1028__br:first-child{transform:translateX(9px)}.tbx-1028__br:last-child{transform:translateX(-9px)}
.tbx-1028:is(:hover,:focus-visible) .tbx-1028__br{opacity:1;transform:translateX(0)}
.tbx-1028:focus-visible{outline:3px solid #855fc2;outline-offset:4px;border-radius:3px}
@media(prefers-reduced-motion:reduce){.tbx-1028__br{transition:none}}

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 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.