Laser hero
Lasers strike a rocky peak; the headline sits in the haze above.
<piix-fx>WebGLLive · 12.09 · Berlin
Strike
the summit.
<section class="hx hx-laser">
<piix-fx kind="beam" fill></piix-fx>
<p class="hx-k">Live · 12.09 · Berlin</p>
<h1>Strike<br>the summit.</h1>
<piix-glow-button palette="fire" size="lg">Get tickets</piix-glow-button>
</section>
<style>
.hx{position:relative;min-height:520px;overflow:hidden;color:#fff;font-family:"Bricolage Grotesque",system-ui,sans-serif;display:grid;align-content:end;justify-items:start;gap:18px;padding:56px;box-sizing:border-box}
.hx h1{position:relative;margin:0;font-size:clamp(44px,7vw,96px);font-weight:800;letter-spacing:-.05em;line-height:.88}
.hx p{position:relative;margin:0}
.hx-k{font:400 12px/1 "JetBrains Mono",monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.hx-laser{background:#050100;align-content:start;padding-top:70px}
.hx-laser h1{text-shadow:0 0 40px rgba(255,77,0,.6)}
.hx-key{background:#000}
.hx-key piix-fx{position:absolute;inset:0 0 10% 35%;width:auto;height:auto}
.hx-key h1{font-weight:300}
</style>
A complete hero section: a moving 3D layer and a layout around it. Copy the markup and the CSS, swap the words, and it is yours. Every hero answers the pointer.
Installation
<!-- once, anywhere on the page: every component --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>
<!-- just laser hero (the shared engine loads itself, once) --> <script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/dist/c/fx.min.js"></script>
npm install piixpal // once, in your entry file import "piixpal";
// npm install piixpal
import "piixpal";
export default function Page() {
return (
<section className="hx hx-laser">
<piix-fx kind="beam" fill></piix-fx>
<p className="hx-k">Live · 12.09 · Berlin</p>
<h1>Strike<br>the summit.</h1>
<piix-glow-button palette="fire" size="lg">Get tickets</piix-glow-button>
</section>
<style>
.hx{position:relative;min-height:520px;overflow:hidden;color:#fff;font-family:"Bricolage Grotesque",system-ui,sans-serif;display:grid;align-content:end;justify-items:start;gap:18px;padding:56px;box-sizing:border-box}
.hx h1{position:relative;margin:0;font-size:clamp(44px,7vw,96px);font-weight:800;letter-spacing:-.05em;line-height:.88}
.hx p{position:relative;margin:0}
.hx-k{font:400 12px/1 "JetBrains Mono",monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.hx-laser{background:#050100;align-content:start;padding-top:70px}
.hx-laser h1{text-shadow:0 0 40px rgba(255,77,0,.6)}
.hx-key{background:#000}
.hx-key piix-fx{position:absolute;inset:0 0 10% 35%;width:auto;height:auto}
.hx-key h1{font-weight:300}
</style>
);
}
Usage
<section class="hx hx-laser">
<piix-fx kind="beam" fill></piix-fx>
<p class="hx-k">Live · 12.09 · Berlin</p>
<h1>Strike<br>the summit.</h1>
<piix-glow-button palette="fire" size="lg">Get tickets</piix-glow-button>
</section>
<style>
.hx{position:relative;min-height:520px;overflow:hidden;color:#fff;font-family:"Bricolage Grotesque",system-ui,sans-serif;display:grid;align-content:end;justify-items:start;gap:18px;padding:56px;box-sizing:border-box}
.hx h1{position:relative;margin:0;font-size:clamp(44px,7vw,96px);font-weight:800;letter-spacing:-.05em;line-height:.88}
.hx p{position:relative;margin:0}
.hx-k{font:400 12px/1 "JetBrains Mono",monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.hx-laser{background:#050100;align-content:start;padding-top:70px}
.hx-laser h1{text-shadow:0 0 40px rgba(255,77,0,.6)}
.hx-key{background:#000}
.hx-key piix-fx{position:absolute;inset:0 0 10% 35%;width:auto;height:auto}
.hx-key h1{font-weight:300}
</style>
Accessibility
- The words are real HTML headings and paragraphs.
- The 3D layer is decoration, or described for screen readers when it carries meaning.
- With reduced motion everything holds still.