Pixel UI/Sections/Hero

Hero

A whole hero section on a GPU pixel background that dissolves in.

<piix-hero>WebGL

New · v1.0

Build something loud

One line of HTML and your landing page glows.

Get started
Background
Palette
Align

Any of the ten backgrounds, with a vignette and scanlines over the top. When it scrolls into view the background dissolves in pixel by pixel, then your content rises in after it. Put anything inside: headings, paragraphs and buttons get hero-sized type and are centred for you.

Installation

<!-- once, anywhere on the page: every component -->
<script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>

Usage

<piix-hero kind="horizon" height="520px">
  <p class="eyebrow">New · v1.0</p>
  <h1>Build something loud</h1>
  <p>One line of HTML and your landing page glows.</p>
  <piix-glow-button>Get started</piix-glow-button>
</piix-hero>

Examples

Left aligned

Changelog

Faster than ever

Every component now shares one GPU context.

With pixel type

Mix in Shine text for the key word.

Make it pop

Shaders, dithered into your palette.

API reference

AttributeWhat it doesDefault
kindwhich background: mesh warp aurora crystal liquid horizon nebula topo dots firemesh
fxa smooth 3D shader instead: blob glass podium ink aura orb and more–
scenean illustrated scene instead–
palettethe colours: lime aurora sunset ocean candy violet fire gameboy paper mono, or your own, dark to light: "#000,#6b4cff,#fff"the background's own
pixelsize of one pixel, in px5
aligncenter or leftcenter
heightany CSS lengthmin(88vh, 780px)

Accessibility