Service Detail Drawer
A drawer slides from the bottom of a service card to reveal a concise overview.
A drawer slides from the bottom of a service card to reveal a concise overview.
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-1078" href="#details" aria-label="View website maintenance service details"><span class="tbx-1078__top"><span class="tbx-1078__icon" aria-hidden="true">▤</span><span class="tbx-1078__head"><b>Ongoing support</b><small>MAINTENANCE</small></span></span><p>We support updates and maintenance after launch.</p><span class="tbx-1078__drawer" aria-hidden="true"><span>Content updates</span><span>Maintenance</span><span>Enquiries</span></span><span class="tbx-1078__more">View details <i aria-hidden="true">→</i></span></a>
.tbx-1078{display:block;width:min(285px,100%);min-height:196px;background:white;border-radius:11px;border:1px solid #d6e2e8;padding:19px;color:#263f50;text-decoration:none;font:12px/1.45 system-ui,sans-serif;box-shadow:0 5px 14px #2136490a;transition:border-color .3s,box-shadow .3s}
.tbx-1078__top{display:flex;align-items:center;gap:11px}.tbx-1078__icon{display:grid;place-items:center;font-size:25px;background:#e4f0ee;color:#31756d;width:45px;height:45px;border-radius:10px;transition:transform .3s}.tbx-1078__head{display:grid;gap:4px}.tbx-1078__head b{font-size:13px}.tbx-1078__head small{font-size:8px;letter-spacing:.09em;color:#7e96a2}
.tbx-1078 p{font-size:10px;color:#6d8490;margin:13px 0 0}.tbx-1078__drawer{display:flex;align-items:center;flex-wrap:wrap;gap:5px;max-height:0;opacity:0;overflow:hidden;margin:0;transition:max-height .4s,opacity .24s,margin .3s}
.tbx-1078__drawer span{font-size:9px;background:#eaf3f0;border-radius:3px;color:#367d77;padding:5px 7px}
.tbx-1078__more{display:flex;align-items:center;justify-content:space-between;font-size:10px;font-weight:800;border-top:1px solid #e8eff1;padding-top:11px;margin-top:14px;color:#347f78}
.tbx-1078__more i{font-style:normal;font-size:18px;transition:transform .3s}
.tbx-1078:is(:hover,:focus-visible){border-color:#8ab8b2;box-shadow:0 11px 23px #21364919}.tbx-1078:is(:hover,:focus-visible) .tbx-1078__drawer{max-height:72px;opacity:1;margin-top:12px}
.tbx-1078:is(:hover,:focus-visible) .tbx-1078__more i{transform:translateX(5px)}.tbx-1078:is(:hover,:focus-visible) .tbx-1078__icon{transform:rotate(-8deg)}
.tbx-1078:focus-visible{outline:3px solid #d9ad6b;outline-offset:4px}
@media(prefers-reduced-motion:reduce){.tbx-1078,.tbx-1078 *{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 service pages 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.