⚜ Building with Lys
A tour of every feature in the structural slide engine
v1.0A tour of every feature in the structural slide engine
v1.0<article> elements into presentations<div data-lys>
<article>
<h1>First Slide</h1>
<p>Any HTML content works here.</p>
</article>
<article data-class="dark" data-background="#1a1a2e">
<h2>Second Slide</h2>
<p>Data attributes control behavior.</p>
</article>
<article id="named" data-notes="For the speaker">
<h2>Named slides enable hash routing</h2>
</article>
</div>
| Attribute | Purpose | Example |
|---|---|---|
data-class |
Add CSS classes to the slide | "title-slide dark" |
data-background |
Background color, gradient, or image | "#1a1a2e" |
data-notes |
Speaker notes (plain text or HTML) | "Mention Q3 figures" |
data-transition |
Transition mode for the deck | "fade" |
data-timing |
Suggested duration in seconds | "30" |
/* Public tokens — set these to customize */
--lys-aspect-ratio: 16/9;
--lys-slide-padding: 4cqi;
--lys-transition-duration: 300ms;
--lys-transition-easing: ease-in-out;
--lys-font-size-base: clamp(0.75rem, 2.5cqi, 1.5rem);
--lys-slide-gap: 0;
--lys-slide-max-width: 100vw;
--lys-slide-max-height: 100vh;
--lys-focus-ring: 2px solid currentColor;
#slide=3 or #slide=intro by slide IDlys.next(), lys.prev(), lys.goTo(n)Every feature must be accessible.
prefers-reduced-motionmust be respected in all animation code. ARIA attributes must be correct.
role="group" on each slide with aria-roledescription="slide"aria-live="polite" region announces slide changesArticles flow as a readable document. Content is always accessible regardless of what loads.
Scroll-snap slides appear. Users navigate by scrolling. Layout and aspect ratio are enforced.
Full experience: keyboard navigation, ARIA announcements, hash routing, programmatic API, fade transitions.
Arrow keys or swipe to navigate
View source to see every data attribute in action