Accordion Hover Cue
A FAQ question reacts to hover, while a click expands or collapses its answer.
A FAQ question reacts to hover, while a click expands or collapses its answer.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<details class="tbx-1041"><summary>How long does production take? <span aria-hidden="true" class="tbx-1041__icon">+</span></summary><p>It depends on the scope and page count. Let's start by discussing the site structure.</p></details>
.tbx-1041{width:min(275px,100%);border:1px solid #cfdae2;border-radius:8px;background:#fff;color:#274258;font:12px/1.65 system-ui;overflow:hidden;transition:border-color .2s}
.tbx-1041 summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 13px;cursor:pointer;list-style:none;font-weight:700;transition:background .2s,color .2s}
.tbx-1041 summary::-webkit-details-marker{display:none}.tbx-1041__icon{width:23px;height:23px;display:grid;place-items:center;border:1px solid #c3d0da;border-radius:50%;font-size:16px;line-height:1;transition:transform .25s,background .25s}
.tbx-1041 summary:is(:hover,:focus-visible){background:#edf7f5;color:#146475}
.tbx-1041 summary:is(:hover,:focus-visible) .tbx-1041__icon{background:#cde8e2;transform:rotate(45deg)}
.tbx-1041[open] .tbx-1041__icon{transform:rotate(45deg);background:#cde8e2}
.tbx-1041[open]{border-color:#76a7aa}.tbx-1041 p{margin:0;padding:0 13px 15px;color:#557086;font-size:11px}
.tbx-1041 summary:focus-visible{outline:2px solid #b78255;outline-offset:-3px}
@media(prefers-reduced-motion:reduce){.tbx-1041,.tbx-1041 summary,.tbx-1041__icon{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 faq 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.