Skip to content
Introducing StyloftCSS 0.1 / A small foundation for your next big idea. Meet the framework
Page sections

Hero sections

Give an idea a strong introduction with responsive type and clear next steps.

CSS only4 examplesKeyboard friendly HTML

The centered introduction

Live preview

A new place to begin

Small start.
Big possibilities.

Build a thoughtful home for your next idea. Start with good defaults and make every detail your own.

View HTML / PlaygroundHTML source
example.htmlHTML
<section class="demo-hero-section sl-stack sl-text-center sl-py-12 sl-px-6">
  <p class="demo-kicker">A new place to begin</p>
  <h2>Small start.<br />Big possibilities.</h2>
  <p class="sl-text-lg sl-text-muted sl-measure sl-mx-auto">
    Build a thoughtful home for your next idea. Start with good defaults and make every
    detail your own.
  </p>
  <div class="sl-cluster sl-justify-center sl-gap-4">
    <a class="sl-btn" href="/getting-started/">Start creating ↗</a
    ><a class="sl-btn sl-btn--outline" href="/components/">See the pieces</a>
  </div>
</section>
HTML source · enable JavaScript for the playground12 lines · UTF-8

A split hero

Live preview
Built for your ideas

A considered foundation.
A fresh perspective.

Let your content lead. Keep the structure simple.

Explore layouts ↗
View HTML / PlaygroundHTML source
example.htmlHTML
<section class="sl-grid sl-md:cols-2 sl-gap-8 sl-items-center">
  <div class="sl-stack">
    <span class="sl-badge">Built for your ideas</span>
    <h2 class="sl-text-xl">A considered foundation.<br />A fresh perspective.</h2>
    <p class="sl-text-muted">Let your content lead. Keep the structure simple.</p>
    <a class="sl-btn" href="/layouts/">Explore layouts ↗</a>
  </div>
  <div class="demo-art demo-art-lavender demo-art-large" aria-hidden="true">
    <span></span><span></span><span></span>
  </div>
</section>
HTML source · enable JavaScript for the playground11 lines · UTF-8

Animated headline and actions

Live preview

A build-time word split with native CSS scroll timelines.

View HTML / PlaygroundHTML source
example.htmlHTML
<section class="sl-card sl-stack sl-gap-6 sl-py-12">
  <h3 class="sl-text-xl sl-split" aria-label="Make room for possibility">
    <span class="sl-word" aria-hidden="true" style="--sl-i: 0">Make</span>
    <span class="sl-word" aria-hidden="true" style="--sl-i: 1">room</span>
    <span class="sl-word" aria-hidden="true" style="--sl-i: 2">for</span>
    <span class="sl-word" aria-hidden="true" style="--sl-i: 3">possibility</span>
  </h3>
  <p class="sl-text-lg sl-text-muted">
    A build-time word split with native CSS scroll timelines.
  </p>
  <div class="sl-cluster">
    <a class="sl-btn sl-hover-sheen" href="/getting-started/"
      >Start building
      <svg
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        stroke-width="2"
        aria-hidden="true"
      >
        <path d="M5 12h14m-6-6 6 6-6 6" /></svg></a
    ><a class="sl-link sl-link--underline" href="/components/">Explore the library</a>
  </div>
</section>
HTML source · enable JavaScript for the playground24 lines · UTF-8

A compact announcement hero

Live preview
New collection

Small pieces. Fresh possibilities.

See what's inside
View HTML / PlaygroundHTML source
example.htmlHTML
<section class="sl-alert sl-cluster sl-justify-between">
  <div class="sl-stack">
    <span class="sl-badge">New collection</span>
    <h3 class="sl-text-xl sl-reveal-text">Small pieces. Fresh possibilities.</h3>
  </div>
  <a class="sl-btn sl-btn--outline sl-hover-lift" href="/components/"
    >See what's inside
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-width="2"
      aria-hidden="true"
    >
      <path d="M5 12h14m-6-6 6 6-6 6" /></svg
  ></a>
</section>
HTML source · enable JavaScript for the playground17 lines · UTF-8

Classes beginning with sl- come from StyloftCSS. Examples with demo- classes also use our optional demo extension CSS ↓. Load it after the core to reproduce those details.