Skip to content
LSD Framework
Components · primitive

Code blocks. Read, copy, switch.

For docs, snippets, and the inevitable npx lsd init. Inline chips for sentence-level pieces, framed blocks for full samples, tabs when the same idea lives across languages, and a copy button that actually says it worked.

01

Inline chip

Mono-spaced, padded, tonal — for code inside prose.

Run lsd build --watch in one terminal and lsd serve in another. Token writes hot-reload through --bg, --accent, and friends.

02

Framed block · line numbers · highlight

Pseudo-syntax coloring via tokens — keywords, strings, comments, numbers.

javascript
12345678
// Aurora · cascade keyframes across siblings
import { cascade } from 'lsd-template';

const stars = document.querySelectorAll('.star');
cascade(stars, {
  origin: 'center',
  step:   60,
});
03

Tabbed · multi-language

Same idea, three surfaces. Tabs preserve focus and announce via ARIA.

123
const root = document.documentElement;
root.style.setProperty('--accent', '#a78bfa');
// Token writes propagate everywhere.
04

Shell command

Single-line, no gutter — for terminal recipes.

bash
$ npx lsd init --surface galaxy --motion aurora

Usage

View HTML
<figure class="cb">
  <div class="cb__chrome">
    <span class="cb__lang">javascript</span>
    <button class="cb__copy" data-copy="id">Copy</button>
  </div>
  <div class="cb__body">
    <div class="cb__gutter"><span>1</span></div>
    <pre class="cb__pre" id="id"><code>
      <span class="cb__line is-hl">…</span>
    </code></pre>
  </div>
</figure>