Hexpunk
InstallConceptsElementsProsehp-cellhp-codehp-copyhp-hexhp-latexhp-visually-hiddenhp-buttonhp-checkboxhp-formhp-labelhp-radiohp-selecthp-sliderhp-togglehp-toggle-grouphp-badgehp-taghp-progresshp-spinnerhp-backgroundhp-clusterhp-collapsiblehp-demohp-gridhp-scroll-areahp-separatorhp-sidebarhp-toolbarhp-avatarhp-iconhp-pixelhp-linkhp-menubarhp-navigation-menuhp-tabshp-alert-dialoghp-context-menuhp-dialoghp-dropdown-menuhp-hover-cardhp-popoverhp-tooltiphp-bannerhp-toasthp-tetherhp-module-handlehp-unfold-listhp-unfold-overlayhp-unfold-pagehp-bondhp-link-nodePaletteAnimationsReleases

Prose

The bare reset from elements.css grounds raw HTML in the design system, but it deliberately ships zero vertical rhythm — no heading margins, no paragraph spacing, no list padding. Drop class="hp-prose" on any container to opt into rhythm for long-form content.

When to reach for it. Article bodies, README renders, MDX output, docs prose, changelog summaries — anywhere a block of HTML wants to read like a document. Not for app chrome (login forms, dashboards, settings panes).

Side-by-side

Same HTML, with and without the wrapper. Both screens use the same elements.css baseline; .hp-prose only adds the rhythm.

The hex stencil

Every hex has a bounding box of w × (w · 2/√3). Axial coordinates project to pixels as x = w · (q + r/2), y = w · √3/2 · r.

The grid uses an effective cell width of w − hex-stroke so adjacent hexes' stroke bands coincide into a single shared edge.

  • Pointy-top is the default orientation.
  • Flat-top kicks in at size="md".
  • Bond detection is opt-in via the bondable attribute.
<body> <div> <h3>The hex stencil</h3> <p>Every hex has a bounding box of <code>w × (w · 2/√3)</code>...</p> <p>The grid uses an effective cell width...</p> <ul> <li>Pointy-top is the default orientation.</li> <li>Flat-top kicks in at <code>size="md"</code>.</li> </ul> </div> </body>

The hex stencil

Every hex has a bounding box of w × (w · 2/√3). Axial coordinates project to pixels as x = w · (q + r/2), y = w · √3/2 · r.

The grid uses an effective cell width of w − hex-stroke so adjacent hexes' stroke bands coincide into a single shared edge.

  • Pointy-top is the default orientation.
  • Flat-top kicks in at size="md".
  • Bond detection is opt-in via the bondable attribute.
<body> <div class="hp-prose"> <h3>The hex stencil</h3> <p>Every hex has a bounding box of <code>w × (w · 2/√3)</code>...</p> <p>The grid uses an effective cell width...</p> <ul> <li>Pointy-top is the default orientation.</li> <li>Flat-top kicks in at <code>size="md"</code>.</li> </ul> </div> </body>

What .hp-prose adds

The rhythm rules in plain English:

Heading rhythm in action

The Foundation

Subsection right under

Two headings stacked back-to-back don't get the full --hp-xl gap — they tighten so a subtitle hugs its parent. Below the second heading, paragraphs resume normal rhythm.

A follow-up paragraph spaces normally — --hp-md from the previous block.

The next subsection

And a new section starts again.

<body> <article class="hp-prose"> <h2>The Foundation</h2> <h3>Subsection right under</h3> <p>Two headings stacked back-to-back tighten...</p> <p>A follow-up paragraph spaces normally...</p> <h3>The next subsection</h3> <p>And a new section starts again.</p> </article> </body>

When NOT to use it

Wrap the content surface, not the page shell. A typical MDX layout sets <article class="hp-prose"> around the rendered body and leaves nav / sidebar / footer outside the wrapper.
esc