Product frame hero in HTML, CSS and vanilla JS
A copy-paste Product frame hero in plain HTML and CSS, with vanilla JavaScript: no framework, no build step, MIT-licensed.
Live preview
Source (copy-ready)
<section class="dcl-product-frame-hero" data-dcl-scheme="light" aria-labelledby="dcl-product-frame-hero-title"><header class="dcl-product-frame-hero__header"><h2 id="dcl-product-frame-hero-title">Product frame hero</h2><p class="dcl-product-frame-hero__muted">Product copy pairs with a lightweight abstract interface frame.</p></header><div class="dcl-product-frame-hero__split"><div><p class="dcl-product-frame-hero__eyebrow">Release operations</p><h3>See migration risk before customers do.</h3><p>Coordinate validation, rollback and support evidence in one rehearsal workspace.</p><a class="dcl-product-frame-hero__cta" href="#dcl-product-frame-hero-details">Inspect the workflow</a></div><svg class="dcl-product-frame-hero__frame" viewBox="0 0 420 250" aria-hidden="true"><rect width="420" height="250" fill="#e4edef"/><rect x="24" y="24" width="140" height="20" fill="#00535a"/><rect x="24" y="64" width="372" height="10" fill="#697f84"/><rect x="24" y="90" width="330" height="10" fill="#697f84"/><rect x="24" y="130" width="110" height="82" fill="#00535a"/><rect x="154" y="130" width="110" height="82" fill="#697f84"/><rect x="284" y="130" width="110" height="82" fill="#697f84"/></svg></div><section id="dcl-product-frame-hero-details" tabindex="-1"><h3>Workflow details</h3><p>Validation, rollback and support evidence stay connected.</p></section><script>(()=>{const root=document.currentScript.closest(".dcl-product-frame-hero");if(!root||root.dataset.dclBound)return;root.dataset.dclBound="1";const instance=Array.from(document.getElementsByClassName("dcl-product-frame-hero")).indexOf(root);if(instance>0){for(const el of [root,...root.querySelectorAll("*")]){for(const attr of ["id","aria-labelledby","aria-controls","aria-describedby","for","name"]){if(el.hasAttribute(attr))el.setAttribute(attr,el.getAttribute(attr)+"--"+instance)}const href=el.getAttribute("href");if(href&&href.startsWith("#"))el.setAttribute("href",href+"--"+instance)}}const preference=matchMedia("(prefers-color-scheme: dark)"),apply=()=>{root.dataset.dclScheme=preference.matches?"dark":"light"};preference.addEventListener("change",apply);apply();const q=(s)=>root.querySelector(s),qa=(s)=>Array.from(root.querySelectorAll(s));})();</script></section>
<style>
.dcl-product-frame-hero{color:#11292f;background-color:#ffffff;color-scheme:light;font:1rem/1.45 system-ui,sans-serif;padding:.8rem;border:1px solid #697f84;border-radius:.6rem;overflow-wrap:anywhere}
.dcl-product-frame-hero *{box-sizing:border-box}.dcl-product-frame-hero h2,.dcl-product-frame-hero h3{line-height:1.15;margin-block:0 .6rem}.dcl-product-frame-hero a{color:#005c62}
.dcl-product-frame-hero button,.dcl-product-frame-hero input,.dcl-product-frame-hero select,.dcl-product-frame-hero textarea,.dcl-product-frame-hero summary{min-block-size:44px;border:1px solid #697f84;border-radius:.3rem;padding:.4rem .65rem;font:inherit;color:#11292f;background-color:#e4edef}
.dcl-product-frame-hero input,.dcl-product-frame-hero select,.dcl-product-frame-hero textarea{background-color:#ffffff}.dcl-product-frame-hero input[type="radio"],.dcl-product-frame-hero input[type="checkbox"]{min-block-size:auto;inline-size:auto}
.dcl-product-frame-hero button,.dcl-product-frame-hero summary{cursor:pointer}.dcl-product-frame-hero button:hover,.dcl-product-frame-hero summary:hover{color:#ffffff;background-color:#00535a}
.dcl-product-frame-hero button:focus-visible,.dcl-product-frame-hero input:focus-visible,.dcl-product-frame-hero select:focus-visible,.dcl-product-frame-hero textarea:focus-visible,.dcl-product-frame-hero summary:focus-visible,.dcl-product-frame-hero a:focus-visible{outline:3px solid #005c62;outline-offset:2px}
.dcl-product-frame-hero details{color:#11292f;background-color:#ffffff;border:1px solid #697f84;border-radius:.4rem;margin-block-start:.6rem}.dcl-product-frame-hero summary{font-weight:650}
.dcl-product-frame-hero dialog{color:#11292f;background-color:#ffffff;border:1px solid #697f84;border-radius:.6rem;max-inline-size:min(34rem,92vw);padding:1rem}
.dcl-product-frame-hero table{border-collapse:collapse;inline-size:100%;color:#11292f;background-color:#ffffff}.dcl-product-frame-hero th,.dcl-product-frame-hero td{padding:.4rem;text-align:start;border-block-end:1px solid #697f84}.dcl-product-frame-hero th{color:#11292f;background-color:#e4edef}
.dcl-product-frame-hero [hidden]{display:none!important}.dcl-product-frame-hero__muted{color:#405a60}.dcl-product-frame-hero__panel{color:#405a60;background-color:#ffffff}.dcl-product-frame-hero__well{color:#11292f;background-color:#e4edef}.dcl-product-frame-hero__primary,.dcl-product-frame-hero__badge{color:#ffffff;background-color:#00535a}.dcl-product-frame-hero__badge{border-radius:999px;padding:.1rem .45rem;font-size:.8rem;font-weight:700}
.dcl-product-frame-hero[data-dcl-scheme="dark"]{color:#eff8f9;background-color:#142f36;color-scheme:dark;border-color:#839fa5}.dcl-product-frame-hero[data-dcl-scheme="dark"] a{color:#8fe1da}
.dcl-product-frame-hero[data-dcl-scheme="dark"] button,.dcl-product-frame-hero[data-dcl-scheme="dark"] input,.dcl-product-frame-hero[data-dcl-scheme="dark"] select,.dcl-product-frame-hero[data-dcl-scheme="dark"] textarea,.dcl-product-frame-hero[data-dcl-scheme="dark"] summary{color:#eff8f9;background-color:#1c3c44;border-color:#839fa5}
.dcl-product-frame-hero[data-dcl-scheme="dark"] input,.dcl-product-frame-hero[data-dcl-scheme="dark"] select,.dcl-product-frame-hero[data-dcl-scheme="dark"] textarea{background-color:#142f36}.dcl-product-frame-hero[data-dcl-scheme="dark"] button:hover,.dcl-product-frame-hero[data-dcl-scheme="dark"] summary:hover{color:#11292f;background-color:#8fe1da}
.dcl-product-frame-hero[data-dcl-scheme="dark"] button:focus-visible,.dcl-product-frame-hero[data-dcl-scheme="dark"] input:focus-visible,.dcl-product-frame-hero[data-dcl-scheme="dark"] select:focus-visible,.dcl-product-frame-hero[data-dcl-scheme="dark"] textarea:focus-visible,.dcl-product-frame-hero[data-dcl-scheme="dark"] summary:focus-visible,.dcl-product-frame-hero[data-dcl-scheme="dark"] a:focus-visible{outline-color:#8fe1da}
.dcl-product-frame-hero[data-dcl-scheme="dark"] details,.dcl-product-frame-hero[data-dcl-scheme="dark"] dialog,.dcl-product-frame-hero[data-dcl-scheme="dark"] table{color:#eff8f9;background-color:#142f36;border-color:#839fa5}.dcl-product-frame-hero[data-dcl-scheme="dark"] th{color:#eff8f9;background-color:#1c3c44}.dcl-product-frame-hero[data-dcl-scheme="dark"] th,.dcl-product-frame-hero[data-dcl-scheme="dark"] td{border-color:#839fa5}
.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero__muted{color:#b0c9ce}.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero__panel{color:#b0c9ce;background-color:#142f36}.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero__well{color:#eff8f9;background-color:#1c3c44}.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero__primary,.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero__badge{color:#11292f;background-color:#8fe1da}
@media (prefers-reduced-motion:reduce){.dcl-product-frame-hero *{transition:none!important;animation:none!important}}
.dcl-product-frame-hero__split{display:grid;grid-template-columns:minmax(0,.9fr) minmax(16rem,1.1fr);gap:1rem;align-items:center}.dcl-product-frame-hero h3{font-size:clamp(2rem,4vw,3.4rem);line-height:1.02}.dcl-product-frame-hero a.dcl-product-frame-hero__cta{display:inline-block;min-block-size:44px;border-radius:.4rem;padding:.55rem .9rem;color:#ffffff;background-color:#00535a;text-decoration:none}.dcl-product-frame-hero[data-dcl-scheme="dark"] .dcl-product-frame-hero a.dcl-product-frame-hero__cta{color:#11292f;background-color:#8fe1da}.dcl-product-frame-hero svg{inline-size:100%;block-size:auto;border-radius:.6rem}@media(max-width:42rem){.dcl-product-frame-hero__split{grid-template-columns:1fr}}</style>
When to use
Use for a product-oriented landing hero where an abstract interface frame clarifies shape without requiring real screenshots. Keep copy specific.
Avoid
Do not use decorative mockups that imply capabilities the product does not have.
Accessibility
The product frame is decorative inline SVG while the headline, explanation and text call-to-action carry the meaning. Hero copy and controls remain selectable text with visible focus. Light body text is #405a60 on #ffffff (7.37:1) and headings #11292f on #ffffff (15.19:1); dark equivalents are #b0c9ce on #142f36 (8.12:1) and #eff8f9 on #142f36 (13.07:1).
Was this useful? Send feedback.