Reference · v0.1.0
Every part, with its markup.
41 entries. Each preview is the code printed under it. Change the theme, type or sound with the Tune button and everything here follows.
Start
Install
Copy the sylhet/ folder beside your pages and add two lines. There is no build step and no dependency. The small inline script stops content flashing before the module loads, and un-hides everything if the module never arrives.
<!-- in <head> -->
<script>(function(d){d.classList.add('sy-js');setTimeout(function(){window.Sylhet||d.classList.remove('sy-js')},4000)})(document.documentElement)</script>
<link rel="stylesheet" href="sylhet/sylhet.css">
<script type="module" src="sylhet/sylhet.js"></script>Start
The brief
A site is described by attributes on <html>. Anything left out takes the default. Add ?theme=kyoto&sound=wood to any URL to preview another dress, or open the tuner with ?tuner.
<html lang="en"
data-sy-theme="tea-leaf" data-sy-scheme="light"
data-sy-type="editorial" data-sy-shape="soft"
data-sy-motion="lively" data-sy-sound="wood" data-sy-ambient="none"
data-sy-text="rise" data-sy-image="curtain" data-sy-hover="zoom" data-sy-tone="natural"
data-sy-scene="shrink" data-sy-cursor="ring" data-sy-heritage="tea-rows">| Name | Values | Notes |
|---|---|---|
data-sy-theme | ultramarine tea-leaf river-stone dusk bridge manuscript deep-forest night-river monsoon ink kyoto marrakech santorini oslo istanbul jaipur cusco nairobi seoul lisbon reykjavik samarkand cairo zanzibar sahara tokyo | Which colours? Each theme is a place: its paper, its ink, one accent. Default ultramarine. |
data-sy-scheme | light dark | Light or dark? Default light. |
data-sy-type | ultramarine editorial grotesk soft bold mono note | What should the words look like? Default ultramarine. |
data-sy-shape | soft sharp round | Corners? Default soft. |
data-sy-motion | still calm lively immersive | How much should move? Default lively. |
data-sy-sound | paper wood water glass stone keys silent | What should the interface sound like when sound is on? Default paper. |
data-sy-ambient | none rain river tea-garden | A quiet background bed? Default none. |
data-sy-text | rise words chars fade blur drop flip slide skew type scramble | How should headlines arrive? Default rise. |
data-sy-image | curtain slide iris blinds dots ink zoom diag split pixel shutter frame fold | How should pictures arrive? Default curtain. |
data-sy-hover | zoom lift tint reveal pan none | What happens when a picture is hovered? Default zoom. |
data-sy-tone | natural mono tint duo | Should photographs take the theme colour? Default natural. |
data-sy-scene | shrink curtain iris shutter split lift knockout dive pan | When a full-screen picture hands over to text on scroll, how? Default shrink. |
data-sy-cursor | none ring blob | A companion cursor on desktop? Default ring. |
data-sy-heritage | woven-mat tea-rows stone rain woven-diamonds bridge manuscript waves wave-scales linked-circles stitch-grid star-tiles meander glazed-tiles woven-stripes mud-cloth stepped-cross knit-star art-deco herringbone lattice blurred-weave tartan four-petals memphis | Which pattern should the site wear on borders and grounds? Default woven-mat. |
Foundations
Colour
Seven roles. Pages are paper, text is ink, sheets float on paper, wells are sunk into it. One accent talks; one signal is kept for the smallest highlights. Every role follows the theme and the scheme.
<div class="sy-cluster"> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-paper)"></i>paper</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-sheet)"></i>sheet</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-sunk)"></i>sunk</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-ink)"></i>ink</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-ink-soft)"></i>ink-soft</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-accent)"></i>accent</span> <span class="sy-tag"><i class="sy-swatch" style="background:var(--sy-signal)"></i>signal</span> </div>
| Name | Values | Notes |
|---|---|---|
--sy-paper / --sy-sheet / --sy-sunk | grounds | The page, surfaces on it, wells in it. |
--sy-ink / --sy-ink-soft / --sy-ink-faint | text | Primary, secondary, placeholder. Ink on paper is at least 7:1. |
--sy-accent / --sy-on-accent / --sy-accent-soft | accent | The one colour. on-accent is picked from its lightness, so any accent stays legible. |
--sy-signal / --sy-on-signal | signal | Tags, a marker swipe, a dot. Never body text. |
--sy-line / --sy-hairline / --sy-track | lines | Ink at 14 %, 8 %, 11 %. |
--sy-good / --sy-warn / --sy-bad | status | Success, warning, error. |
data-sy-scheme="dark" | any element | Flips a section. A dark band inside a light page is one attribute. |
Foundations
Themes
26 themes, each named for a place and audited for contrast in both schemes. A theme is six numbers; write your own in six lines.
<div class="sy-cluster"> <button class="sy-tag" data-sy-theme="ultramarine" data-sy-set="theme:ultramarine" title="Sylhet: The Surma river: cool paper, ink navy, ultramarine."><i class="sy-swatch" style="background:var(--sy-accent)"></i>ultramarine</button> <button class="sy-tag" data-sy-theme="tea-leaf" data-sy-set="theme:tea-leaf" title="Sylhet: Tea gardens: warm cream, leaf green, morning sun."><i class="sy-swatch" style="background:var(--sy-accent)"></i>tea-leaf</button> <button class="sy-tag" data-sy-theme="river-stone" data-sy-set="theme:river-stone" title="Sylhet: River stones and clear water: stone grey, teal, a coral float."><i class="sy-swatch" style="background:var(--sy-accent)"></i>river-stone</button> <button class="sy-tag" data-sy-theme="dusk" data-sy-set="theme:dusk" title="Sylhet: The haor at dusk: peach paper, plum ink, coral."><i class="sy-swatch" style="background:var(--sy-accent)"></i>dusk</button> <button class="sy-tag" data-sy-theme="bridge" data-sy-set="theme:bridge" title="Sylhet: Keane Bridge: iron, rivets, red oxide."><i class="sy-swatch" style="background:var(--sy-accent)"></i>bridge</button> <button class="sy-tag" data-sy-theme="manuscript" data-sy-set="theme:manuscript" title="Sylhet: Sylheti Nagri manuscripts: aged paper, black ink, vermilion."><i class="sy-swatch" style="background:var(--sy-accent)"></i>manuscript</button> <button class="sy-tag" data-sy-theme="deep-forest" data-sy-set="theme:deep-forest" title="Sylhet: The swamp forest: green-black water, mint light."><i class="sy-swatch" style="background:var(--sy-accent)"></i>deep-forest</button> <button class="sy-tag" data-sy-theme="night-river" data-sy-set="theme:night-river" title="Sylhet: The blue river: deep navy, cyan."><i class="sy-swatch" style="background:var(--sy-accent)"></i>night-river</button> <button class="sy-tag" data-sy-theme="monsoon" data-sy-set="theme:monsoon" title="Sylhet: Monsoon over the quarry: slate cloud, an amber break in the sky."><i class="sy-swatch" style="background:var(--sy-accent)"></i>monsoon</button> <button class="sy-tag" data-sy-theme="ink" data-sy-set="theme:ink" title="Sylhet: Ink only: the accent is the ink itself, with one lime signal."><i class="sy-swatch" style="background:var(--sy-accent)"></i>ink</button> <button class="sy-tag" data-sy-theme="kyoto" data-sy-set="theme:kyoto" title="Japan: Washi paper, aizome indigo, a vermilion seal."><i class="sy-swatch" style="background:var(--sy-accent)"></i>kyoto</button> <button class="sy-tag" data-sy-theme="marrakech" data-sy-set="theme:marrakech" title="Morocco: Rammed-earth walls, terracotta, Majorelle blue."><i class="sy-swatch" style="background:var(--sy-accent)"></i>marrakech</button> <button class="sy-tag" data-sy-theme="santorini" data-sy-set="theme:santorini" title="Greece: Limewash, Aegean blue, bougainvillea."><i class="sy-swatch" style="background:var(--sy-accent)"></i>santorini</button> <button class="sy-tag" data-sy-theme="oslo" data-sy-set="theme:oslo" title="Norway: Fog over the fjord: cool grey, deep water, one mustard coat."><i class="sy-swatch" style="background:var(--sy-accent)"></i>oslo</button> <button class="sy-tag" data-sy-theme="istanbul" data-sy-set="theme:istanbul" title="Türkiye: Iznik tiles: turquoise glaze, tulip red."><i class="sy-swatch" style="background:var(--sy-accent)"></i>istanbul</button> <button class="sy-tag" data-sy-theme="jaipur" data-sy-set="theme:jaipur" title="India: The pink city: rose sandstone, marigold."><i class="sy-swatch" style="background:var(--sy-accent)"></i>jaipur</button> <button class="sy-tag" data-sy-theme="cusco" data-sy-set="theme:cusco" title="Peru: Andean weaving: earth, magenta wool, turquoise."><i class="sy-swatch" style="background:var(--sy-accent)"></i>cusco</button> <button class="sy-tag" data-sy-theme="nairobi" data-sy-set="theme:nairobi" title="Kenya: Savanna grass, acacia green, a sunset."><i class="sy-swatch" style="background:var(--sy-accent)"></i>nairobi</button> <button class="sy-tag" data-sy-theme="seoul" data-sy-set="theme:seoul" title="Korea: Hanji paper, celadon glaze, dancheong red."><i class="sy-swatch" style="background:var(--sy-accent)"></i>seoul</button> <button class="sy-tag" data-sy-theme="lisbon" data-sy-set="theme:lisbon" title="Portugal: Azulejo tiles: tin-glaze white, cobalt, tram yellow."><i class="sy-swatch" style="background:var(--sy-accent)"></i>lisbon</button> <button class="sy-tag" data-sy-theme="reykjavik" data-sy-set="theme:reykjavik" title="Iceland: Basalt and aurora: black sand, green light, a violet edge."><i class="sy-swatch" style="background:var(--sy-accent)"></i>reykjavik</button> <button class="sy-tag" data-sy-theme="samarkand" data-sy-set="theme:samarkand" title="Uzbekistan: The Registan: lapis tile and gold leaf."><i class="sy-swatch" style="background:var(--sy-accent)"></i>samarkand</button> <button class="sy-tag" data-sy-theme="cairo" data-sy-set="theme:cairo" title="Egypt: Limestone, the Nile, a little gold."><i class="sy-swatch" style="background:var(--sy-accent)"></i>cairo</button> <button class="sy-tag" data-sy-theme="zanzibar" data-sy-set="theme:zanzibar" title="Tanzania: Coral stone houses on a teal sea."><i class="sy-swatch" style="background:var(--sy-accent)"></i>zanzibar</button> <button class="sy-tag" data-sy-theme="sahara" data-sy-set="theme:sahara" title="North Africa: Dunes at noon, burnt orange, the indigo of a tagelmust."><i class="sy-swatch" style="background:var(--sy-accent)"></i>sahara</button> <button class="sy-tag" data-sy-theme="tokyo" data-sy-set="theme:tokyo" title="Japan: Shinjuku after rain: violet night, magenta sign, cyan reflection."><i class="sy-swatch" style="background:var(--sy-accent)"></i>tokyo</button> </div>
| Name | Values | Notes |
|---|---|---|
--sy-hue, --sy-tint | number | Hue and chroma shared by paper and ink. |
--sy-accent-h, --sy-accent-c | number | Accent hue and chroma. |
--sy-accent-l, --sy-accent-ld | 0–1 | Accent lightness on light, and on dark. |
--sy-signal | colour | The second colour. |
Foundations
Type
Five sizes of display, a lead, a body, a label. One phrase per heading goes in .sy-accent: that serif italic in the accent colour is the signature of the language.
Label · names things
Display accent
Heading one
Heading two
Heading three
Lead text introduces a section in two or three lines.
Body is sixteen pixels with a measure near sixty characters. A marker swipe and a link.
<div class="sy-stack"> <p class="sy-label">Label · names things</p> <h3 class="sy-display">Display <span class="sy-accent">accent</span></h3> <h3 class="sy-h1">Heading one</h3> <h3 class="sy-h2">Heading two</h3> <h3 class="sy-h3">Heading three</h3> <p class="sy-lead">Lead text introduces a section in two or three lines.</p> <p class="sy-body">Body is sixteen pixels with a measure near sixty characters. A <mark class="sy-mark">marker swipe</mark> and a <a class="sy-link" href="#type">link</a>.</p> </div>
| Name | Values | Notes |
|---|---|---|
.sy-mega .sy-display .sy-h1 .sy-h2 .sy-h3 | display | Fluid sizes; each carries its own leading and tracking. |
.sy-lead .sy-body .sy-small .sy-label | text | Lead, body, small, mono label. |
.sy-accent | phrase | The accent phrase. One per heading. |
.sy-mark .sy-link .sy-underline | inline | Marker, link, drawn underline. |
.sy-bn .sy-manuscript | script | Bengali (Hind Siliguri) and Sylheti Nagri (Noto). |
data-sy-type | ultramarine editorial grotesk soft bold mono note | The pairing. Fonts load from Google Fonts unless <html data-sy-fonts="off">. |
Foundations
Layout
A container, a section rhythm and five arrangements cover most pages.
<div class="sy-auto" style="--sy-min: 140px"> <div class="sy-card sy-card--sunk">auto</div><div class="sy-card sy-card--sunk">auto</div><div class="sy-card sy-card--sunk">auto</div> </div>
| Name | Values | Notes |
|---|---|---|
.sy-container | --narrow | Page column with fluid gutters (max 1320 px). |
.sy-section | --tight | Vertical rhythm, 64 to 120 px. |
.sy-frame | An inset rounded surface that floats inside the viewport edge. | |
.sy-stack / .sy-cluster / .sy-between | --sy-gap | Column, wrapping row, ends apart. |
.sy-grid + .sy-col-3…12 | Twelve columns; stacks under 860 px. | |
.sy-auto | --sy-min | As many equal columns as fit. |
.sy-split | --sy-split | Two columns that stack on small screens. |
.sy-bento + .sy-wide .sy-half .sy-tall | A six-column mosaic of cards. |
Foundations
Grounds and patterns
Surfaces for sections, and the heritage motif as a ground or a border strip.
<div class="sy-stack"> <div class="sy-pattern-strip"></div> <div class="sy-pattern sy-card" style="--sy-pattern-alpha:.3; --sy-pattern-ink: var(--sy-accent); min-height:120px">.sy-pattern</div> <div class="sy-card sy-glow" style="min-height:120px">.sy-glow</div> </div>
| Name | Values | Notes |
|---|---|---|
.sy-on-sheet .sy-on-sunk .sy-on-accent | Section grounds. | |
.sy-glow .sy-gridlines .sy-grain | Accent glow, hairline grid, film grain (on <body>). | |
.sy-pattern | --sy-pattern-alpha, --sy-pattern-ink, --sy-pattern-size | The motif as a background. |
.sy-pattern-strip | --sy-strip | The motif as a border. |
data-sy-heritage | 25 motifs | On <html> for the site, or on one element. |
Components
Button
A fill rises from below on hover. Variants only change two colours. Works on <a> and <button>.
<div class="sy-cluster"> <button class="sy-btn">Ink</button> <button class="sy-btn sy-btn--accent">Accent <i data-sy-icon="arrow-up-right"></i></button> <button class="sy-btn sy-btn--outline">Outline</button> <button class="sy-btn sy-btn--ghost">Ghost</button> <button class="sy-btn sy-btn--sheet">Sheet</button> <button class="sy-btn sy-btn--sm">Small</button> <button class="sy-btn sy-btn--lg sy-btn--accent" data-sy-magnetic>Large</button> <button class="sy-btn sy-btn--icon sy-btn--outline" aria-label="Add"><i data-sy-icon="plus"></i></button> </div>
| Name | Values | Notes |
|---|---|---|
.sy-btn | --accent --outline --ghost --sheet | Default is ink. |
size | --sm --lg --icon | 36, 44 (default) and 56 px tall. |
data-sy-magnetic | 0–1 | Pulls toward the pointer. |
data-sy-cue | a cue or none | Override or silence its sound. |
Components
Tag, dot, key
Small facts.
<div class="sy-cluster"> <span class="sy-tag">Tag</span><span class="sy-tag sy-tag--solid">Solid</span><span class="sy-tag sy-tag--accent">Accent</span><span class="sy-tag sy-tag--signal">Signal</span> <span class="sy-tag"><i class="sy-dot sy-dot--live"></i>Live</span><kbd class="sy-kbd">⌘K</kbd><span class="sy-avatar">NH</span> </div>
Components
Card
A sheet for one idea. Make it an <a> and it lifts on hover.
<div class="sy-auto" style="--sy-min: 180px"> <a class="sy-card" href="#card"><h4 class="sy-h3">Link card</h4><p class="sy-soft">Lifts on hover.</p><div class="sy-card__foot"><span class="sy-tag">Tag</span><i data-sy-icon="arrow-up-right"></i></div></a> <div class="sy-card sy-card--sunk"><h4 class="sy-h3">Sunk</h4></div> <div class="sy-card sy-card--ink"><h4 class="sy-h3">Ink</h4></div> <div class="sy-card sy-card--accent"><h4 class="sy-h3">Accent</h4></div> </div>
| Name | Values | Notes |
|---|---|---|
.sy-card | --plain --sunk --ink --accent --lift | |
.sy-card__foot | Pinned to the bottom. | |
data-sy-tilt | degrees | Leans toward the pointer. |
Components
Media
The well for a picture, a video, a 3D shape or an animation. If the image file is missing, the heritage art named in data-sy-art is shown instead.

<div class="sy-auto" style="--sy-min: 200px"> <div class="sy-media" data-sy-image data-sy-hover><img src="../images/portfolio-work-1.webp" alt="" data-sy-art="bridge"></div> <div class="sy-media" data-sy-art="hills" data-sy-hover="reveal"><div class="sy-media__cap"><span>A caption</span><i data-sy-icon="arrow-up-right"></i></div></div> </div>
| Name | Values | Notes |
|---|---|---|
.sy-media | --sy-ratio | Default 4 / 3. |
data-sy-image | curtain slide iris blinds dots ink zoom diag split pixel shutter frame fold | Entrance. Empty takes the brief. |
data-sy-hover | zoom lift tint reveal pan none | Hover. Empty takes the brief. |
data-sy-tone | natural mono tint duo | Re-tone a photograph to the theme. |
data-sy-art | hills river bridge stones tea rain | Heritage art: on the well itself, or on an <img> as its fallback. |
Components
Rows
A list with a rule between items: an index of work, a menu, a schedule. Add data-sy-preview for a picture that follows the pointer.
<div class="sy-rows"> <a class="sy-row" href="#rows" data-sy-preview="art:bridge" data-sy-cursor-label="View"><span class="sy-label">01</span><span class="sy-row__title">Project one</span><i data-sy-icon="arrow-up-right"></i></a> <a class="sy-row" href="#rows" data-sy-preview="art:tea" data-sy-cursor-label="View"><span class="sy-label">02</span><span class="sy-row__title">Project two</span><i data-sy-icon="arrow-up-right"></i></a> </div>
| Name | Values | Notes |
|---|---|---|
--sy-row-cols | grid columns | Default 3.5rem 1fr auto. |
data-sy-preview | image URL or art:name | Cursor preview. |
data-sy-cursor-label | text | Label inside the cursor. |
Components
Stat and quote
A number that counts up when it is first seen, and a pulled quote.
“Two leaves and a bud.”
<div class="sy-auto" style="--sy-min: 180px"> <div class="sy-stat"><span class="sy-stat__value"><span data-sy-count="117">117</span></span><span class="sy-soft">animations</span></div> <div class="sy-stat"><span class="sy-stat__value"><span data-sy-count="99.9">99.9</span>%</span><span class="sy-soft">uptime</span></div> <p class="sy-quote">“Two leaves and a bud.”</p> </div>
Components
Form
Native controls, dressed. A valid submit plays success; an invalid field plays error.
<form class="sy-stack" style="max-width: 420px" onsubmit="event.preventDefault(); Sylhet.toast('Sent', { cue: null })">
<div class="sy-field"><label for="r-name">Name</label><input class="sy-input" id="r-name" required placeholder="Your name"><span class="sy-hint">As you would like to be addressed.</span></div>
<div class="sy-field"><label for="r-kind">Kind</label><select class="sy-select" id="r-kind"><option>Portfolio</option><option>Shop</option></select></div>
<div class="sy-field"><label for="r-note">Note</label><textarea class="sy-textarea" id="r-note"></textarea></div>
<div class="sy-cluster"><label class="sy-switch"><input type="checkbox" checked>Sound</label><label class="sy-check"><input type="checkbox">Agree</label><label class="sy-check"><input type="radio" name="rr" checked>A</label><label class="sy-check"><input type="radio" name="rr">B</label></div>
<input class="sy-range" type="range" aria-label="Amount">
<button class="sy-btn sy-btn--accent">Send</button>
</form>Components
Segmented control and tabs
One choice of a few. With role="tab" it switches panels.
First panel.
Second panel.
Third panel.
<div class="sy-tabs sy-stack"> <div class="sy-seg" role="tablist"><button role="tab" aria-controls="ref-t1" aria-selected="true">One</button><button role="tab" aria-controls="ref-t2">Two</button><button role="tab" aria-controls="ref-t3">Three</button></div> <p class="sy-tabs__panel" id="ref-t1">First panel.</p><p class="sy-tabs__panel" id="ref-t2" hidden>Second panel.</p><p class="sy-tabs__panel" id="ref-t3" hidden>Third panel.</p> </div>
Components
Accordion
Native <details>, with an animated height where the browser supports it.
Does it need a framework?
No. One stylesheet, one module, attributes.
Does it work without JavaScript?
Yes. Every hidden state is added by the script.
<div class="sy-accordion"> <details open><summary>Does it need a framework?</summary><p>No. One stylesheet, one module, attributes.</p></details> <details><summary>Does it work without JavaScript?</summary><p>Yes. Every hidden state is added by the script.</p></details> </div>
Components
Dialog and toast
A native <dialog> with a blurred backdrop, and a toast for a quiet message.
<div class="sy-cluster"> <button class="sy-btn" data-sy-open="ref-dialog">Open dialog</button> <button class="sy-btn sy-btn--outline" data-sy-toast="Saved" data-sy-cue="none">Toast</button> </div> <dialog class="sy-dialog" id="ref-dialog"><div class="sy-stack"><h4 class="sy-h2">A dialog</h4><p class="sy-soft">Escape or the backdrop closes it.</p><button class="sy-btn sy-btn--accent" data-sy-close data-sy-cue="none" style="justify-self:start">Close</button></div></dialog>
| Name | Values | Notes |
|---|---|---|
data-sy-open="id" | Opens that dialog. | |
data-sy-close | Closes the dialog it is in. | |
data-sy-toast="text" | data-sy-toast-cue | Shows a toast. |
Sylhet.toast(text, { cue, duration }) | From script. |
Components
Table, code, progress
For documents and dashboards.
| Plan | Seats | Price |
|---|---|---|
| Starter | 5 | $0 |
| Team | Unlimited | $12 |
npm run dev
<div class="sy-stack"> <table class="sy-table"><thead><tr><th>Plan</th><th>Seats</th><th>Price</th></tr></thead><tbody><tr><td>Starter</td><td>5</td><td>$0</td></tr><tr><td>Team</td><td>Unlimited</td><td>$12</td></tr></tbody></table> <div class="sy-progress" style="--sy-value: .62"><i></i></div> <div class="sy-skeleton" style="height: 18px; width: 60%"></div> <pre class="sy-code">npm run dev</pre> </div>
Components
Sound toggle and gate
Sound is always opt-in. An empty [data-sy-sound-toggle] button fills itself with three bars and a label. An immersive site can open with a counted gate that asks.
<div class="sy-cluster"><button data-sy-sound-toggle></button></div>
| Name | Values | Notes |
|---|---|---|
data-sy-sound-toggle | Any button. Remembers the choice. | |
.sy-gate | data-sy-gate-count, data-sy-gate-choices, data-sy-enter="sound|muted" | The preloader (immersive level, once per visit). |
<html data-sy-sound-start="on"> | Start with sound on after the first gesture. |
Components
The badge
Every page built with Sylhet closes with a small “Made with Sylhet Design System” mark. sylhet.js adds it after the footer and puts it back if it is removed or hidden. It is attribution, and the licence asks that it stays.
Motion
Motion levels
One attribute sets how much moves. The same markup runs at every level; prefers-reduced-motion caps the level at calm.
| Name | Values | Notes |
|---|---|---|
still | Nothing travels. State changes are instant. | |
calm | Reveals, image entrances, counters. | |
lively | Plus text effects, scramble, magnets, tilt, parallax, word fill, scenes, pinned runs, the cursor. | |
immersive | Plus the gate and the page curtain. | |
--sy-dur-1…5 | 120 240 480 800 1200 ms | Durations. |
--sy-ease-out / soft / io / heavy / spring | Curves. |
Motion
Reveal
An element arrives when it enters the viewport. A group staggers its children.
<div class="sy-auto" style="--sy-min: 120px" data-sy-reveal-group> <div class="sy-card sy-card--sunk">one</div><div class="sy-card sy-card--sunk">two</div><div class="sy-card sy-card--sunk">three</div><div class="sy-card sy-card--sunk" data-sy-reveal="scale">scale</div><div class="sy-card sy-card--sunk" data-sy-reveal="blur">blur</div> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-reveal | up left right scale blur clip fade | |
data-sy-reveal-group | a reveal kind | Staggers direct children. |
--sy-delay | time | Extra delay. |
Motion
Text entrances
Fifteen ways for a headline to arrive. The site picks one in the brief (data-sy-text on <html>); a heading with an empty data-sy-text uses it, or name one per heading.
The river runs slowrise
The river runs slowwords
The river runs slowchars
The river runs slowfade
The river runs slowblur
The river runs slowdrop
The river runs slowflip
The river runs slowslide
The river runs slowskew
The river runs slowtype
The river runs slowscramble
The river runs slowstretch
The river runs slowwave
The river runs slowhighlight
The river runs slowgradient
<div class="sy-stack"> <p class="sy-between"><span class="sy-h2" data-sy-text="rise">The river runs slow</span><span class="sy-label">rise</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="words">The river runs slow</span><span class="sy-label">words</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="chars">The river runs slow</span><span class="sy-label">chars</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="fade">The river runs slow</span><span class="sy-label">fade</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="blur">The river runs slow</span><span class="sy-label">blur</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="drop">The river runs slow</span><span class="sy-label">drop</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="flip">The river runs slow</span><span class="sy-label">flip</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="slide">The river runs slow</span><span class="sy-label">slide</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="skew">The river runs slow</span><span class="sy-label">skew</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="type">The river runs slow</span><span class="sy-label">type</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="scramble">The river runs slow</span><span class="sy-label">scramble</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="stretch">The river runs slow</span><span class="sy-label">stretch</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="wave">The river runs slow</span><span class="sy-label">wave</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="highlight">The river runs slow</span><span class="sy-label">highlight</span></p> <p class="sy-between"><span class="sy-h2" data-sy-text="gradient">The river runs slow</span><span class="sy-label">gradient</span></p> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-text | rise words chars fade blur drop flip slide skew type scramble stretch wave highlight gradient | Empty takes the brief. |
--sy-text-stagger | time | Delay between units. |
data-sy-split | lines words chars | Older spelling of rise / words / chars. |
Motion
Image entrances
Thirteen ways for a picture to arrive.
<div class="sy-auto" style="--sy-min: 150px"> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="curtain" data-sy-art="hills"></div><figcaption class="sy-label">curtain</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="slide" data-sy-art="river"></div><figcaption class="sy-label">slide</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="iris" data-sy-art="bridge"></div><figcaption class="sy-label">iris</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="blinds" data-sy-art="stones"></div><figcaption class="sy-label">blinds</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="dots" data-sy-art="tea"></div><figcaption class="sy-label">dots</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="ink" data-sy-art="rain"></div><figcaption class="sy-label">ink</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="zoom" data-sy-art="hills"></div><figcaption class="sy-label">zoom</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="diag" data-sy-art="river"></div><figcaption class="sy-label">diag</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="split" data-sy-art="bridge"></div><figcaption class="sy-label">split</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="pixel" data-sy-art="stones"></div><figcaption class="sy-label">pixel</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="shutter" data-sy-art="tea"></div><figcaption class="sy-label">shutter</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="frame" data-sy-art="rain"></div><figcaption class="sy-label">frame</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-image="fold" data-sy-art="hills"></div><figcaption class="sy-label">fold</figcaption></figure> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-image | curtain slide iris blinds dots ink zoom diag split pixel shutter frame fold | On .sy-media. Empty takes the brief. |
Motion
Image hovers and tones
What a picture does under the pointer, and how a photograph is made to belong to the theme.
<div class="sy-auto" style="--sy-min: 150px"> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-hover="zoom" data-sy-art="hills"></div><figcaption class="sy-label">zoom</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-hover="lift" data-sy-art="river"></div><figcaption class="sy-label">lift</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-hover="tint" data-sy-art="bridge"></div><figcaption class="sy-label">tint</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-hover="reveal" data-sy-art="stones"><div class="sy-media__cap"><span>Caption</span></div></div><figcaption class="sy-label">reveal</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 6px"><div class="sy-media" data-sy-hover="pan" data-sy-art="tea"></div><figcaption class="sy-label">pan</figcaption></figure> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-hover | zoom lift tint reveal pan none | |
data-sy-tone | natural mono tint duo | For photographs; heritage art is already in theme colours. |
Motion
Scenes: photo to text
A full-screen picture hands the page to text as you scroll. The section is tall, the stage sticks, and the script writes --sy-progress. Nine handoffs; the brief names one. Without motion a scene is a picture above its text.
<section class="sy-scene" data-sy-scene="shrink">
<div class="sy-scene__stage">
<div class="sy-scene__media"><img src="images/scene-hills.webp" alt="" data-sy-art="hills"></div>
<div class="sy-scene__text">
<h2 class="sy-display">Photo, then <span class="sy-accent">words.</span></h2>
<p class="sy-lead">Text that arrives as the picture leaves.</p>
</div>
</div>
</section>| Name | Values | Notes |
|---|---|---|
data-sy-scene | shrink curtain iris shutter split lift knockout dive pan | Empty takes the brief. |
--sy-scene-length | height | Scroll length, default 260vh. |
Demo | Open docs/index.html#scene and pick each one. |
Motion
Pointer: magnetic, tilt, cursor
Things that answer the pointer. All are off for touch and below the lively level.
data-sy-tilt
Leans, with a light that follows.
<div class="sy-auto" style="--sy-min: 200px"> <div class="sy-card" data-sy-tilt><p class="sy-label">data-sy-tilt</p><p>Leans, with a light that follows.</p></div> <div class="sy-card sy-center"><button class="sy-btn sy-btn--accent sy-btn--lg" data-sy-magnetic="0.45">Magnetic</button></div> <a class="sy-card sy-center" href="#pointer" data-sy-cursor-label="Open"><span class="sy-h3" data-sy-scramble>Scramble me</span></a> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-magnetic | 0–1 (0.3) | |
data-sy-tilt | degrees (9) | Children with data-sy-depth float above. |
data-sy-scramble | enter or on hover | |
data-sy-cursor-label | text | Turns the cursor into a labelled disc. |
data-sy-cursor | none ring blob | On <html>. |
Motion
Scroll: fill, parallax, marquee, pinned run, orbit
Things driven by scrolling or by time.
This paragraph inks in as it is read, word by word, as you scroll slowly past it.
<div class="sy-stack"> <p class="sy-lead" data-sy-fill>This paragraph inks in as it is read, word by word, as you scroll slowly past it.</p> <div class="sy-marquee"><div class="sy-marquee__track sy-h3"><span>Marquee</span><i class="sy-dot"></i><span class="sy-accent">keeps going</span><i class="sy-dot"></i><span>Marquee</span><i class="sy-dot"></i></div></div> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-fill | Word fill, linked to reading position. | |
data-sy-parallax | amount (0.2) | Drifts against the scroll. |
.sy-marquee > .sy-marquee__track | --sy-speed, data-reverse | Seamless loop; pauses on hover. |
.sy-pinx > __stage > __track | A pinned horizontal run of cards. | |
.sy-orbit > .sy-orbit__ring | --sy-speed | Items on a turning 3D ring. |
.sy-scrollbar | A reading-progress line. |
Motion
Draw
Any icon or stroked doodle can draw itself, on enter or on hover.
<div class="sy-cluster" style="font-size: 40px"> <i data-sy-icon="bridge" data-sy-draw></i><i data-sy-icon="cup" data-sy-draw></i><i data-sy-icon="hills" data-sy-draw></i> <i data-sy-doodle="arrow-3" data-sy-draw style="--sy-size: 120px"></i><i data-sy-doodle="ring-2" data-sy-draw style="--sy-size: 160px"></i> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-draw | on enter, or hover | On the icon or doodle host. |
Sound
Cues
Ten cues, named for what happened. Elements are wired by meaning; you rarely call them yourself.
<div class="sy-cluster" data-sy-cue="none">
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'hover')">hover</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'click')">click</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'toggleOn')">toggleOn</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'toggleOff')">toggleOff</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'open')">open</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'close')">close</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'success')">success</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'error')">error</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'whoosh')">whoosh</button>
<button class="sy-btn sy-btn--outline sy-btn--sm" onclick="Sylhet.sound.enable({silent:true}); Sylhet.sound.audition(Sylhet.brief.get('sound'), 'notify')">notify</button>
</div>| Name | Values | Notes |
|---|---|---|
hover / click | Links, buttons, summaries. | |
toggleOn / toggleOff | Checkboxes, switches. | |
open / close | <details>, dialogs, the menu. | |
success / error | A valid submit, an invalid field. | |
whoosh / notify | The page curtain, toasts. | |
data-sy-cue | a cue or none | Override or silence one element (and its children). |
Sound
Packs and ambient
Five recorded materials (paper, wood, water, glass, stone), one synthesised (keys), and silence (silent). Three ambient beds of nature, not music. A cue whose file is missing is synthesised, so the engine always answers.
<div class="sy-stack" data-sy-cue="none"> <div class="sy-seg"><button data-sy-set="sound:paper">paper</button><button data-sy-set="sound:wood">wood</button><button data-sy-set="sound:water">water</button><button data-sy-set="sound:glass">glass</button><button data-sy-set="sound:stone">stone</button><button data-sy-set="sound:keys">keys</button><button data-sy-set="sound:silent">silent</button></div> <div class="sy-seg"><button data-sy-set="ambient:none">none</button><button data-sy-set="ambient:rain">rain</button><button data-sy-set="ambient:river">river</button><button data-sy-set="ambient:tea-garden">tea-garden</button></div> </div>
| Name | Values | Notes |
|---|---|---|
paper | paper | Recorded with ElevenLabs, trimmed and levelled. |
wood | wood | Recorded with ElevenLabs, trimmed and levelled. |
water | water | Recorded with ElevenLabs, trimmed and levelled. |
glass | glass | Recorded with ElevenLabs, trimmed and levelled. |
stone | stone | Recorded with ElevenLabs, trimmed and levelled. |
keys | mechanical keys | Synthesised live, no files. |
rain | rain | 22 s loop, cross-faded over its own seam. |
river | river | 22 s loop, cross-faded over its own seam. |
tea-garden | tea garden | 22 s loop, cross-faded over its own seam. |
Sound
Sound API
For the cases a page wants to speak for itself.
Sylhet.sound.play('success') // a cue from the current pack
Sylhet.sound.enable() / .disable() / .toggle()
Sylhet.sound.on // boolean
Sylhet.sound.setPack('wood') // same as brief.set('sound', 'wood')
Sylhet.sound.setAmbient('rain')
Sylhet.sound.setVolume(0.6)
Sylhet.bus.on('sound', ({ on }) => {})3D
Shapes
Seven shapes ray-marched in one shader, coloured from the theme, turning with the pointer. No library. One hidden WebGL canvas draws every shape on the page.
<div class="sy-auto" style="--sy-min: 110px"> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="orb" data-sy-material="clay"></div><figcaption class="sy-label">orb · clay</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="blob" data-sy-material="glass"></div><figcaption class="sy-label">blob · glass</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="torus" data-sy-material="metal"></div><figcaption class="sy-label">torus · metal</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="cube" data-sy-material="ink"></div><figcaption class="sy-label">cube · ink</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="gem" data-sy-material="clay"></div><figcaption class="sy-label">gem · clay</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="pill" data-sy-material="glass"></div><figcaption class="sy-label">pill · glass</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px; text-align: center"><div class="sy-shape3d" data-sy-shape3d="rings" data-sy-material="metal"></div><figcaption class="sy-label">rings · metal</figcaption></figure> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-shape3d | orb blob torus cube gem pill rings | |
data-sy-material | clay glass metal ink | |
data-sy-color | signal | Use the signal colour. |
Sylhet.shape3d.set(el, { shape, material }) | Change a live shape. |
3D
Backdrops
Four living grounds for a hero or a band. Put the backdrop first inside a positioned section.
<div class="sy-auto" style="--sy-min: 200px"> <div style="position:relative;height:160px;border-radius:var(--sy-radius-md);overflow:hidden;display:grid;align-items:end;padding:10px"><div class="sy-backdrop" data-sy-backdrop="aurora"></div><span class="sy-tag sy-tag--solid" style="justify-self:start">aurora</span></div> <div style="position:relative;height:160px;border-radius:var(--sy-radius-md);overflow:hidden;display:grid;align-items:end;padding:10px"><div class="sy-backdrop" data-sy-backdrop="terrace"></div><span class="sy-tag sy-tag--solid" style="justify-self:start">terrace</span></div> <div style="position:relative;height:160px;border-radius:var(--sy-radius-md);overflow:hidden;display:grid;align-items:end;padding:10px"><div class="sy-backdrop" data-sy-backdrop="rain"></div><span class="sy-tag sy-tag--solid" style="justify-self:start">rain</span></div> <div style="position:relative;height:160px;border-radius:var(--sy-radius-md);overflow:hidden;display:grid;align-items:end;padding:10px"><div class="sy-backdrop" data-sy-backdrop="river"></div><span class="sy-tag sy-tag--solid" style="justify-self:start">river</span></div> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-backdrop | aurora terrace rain river | On .sy-backdrop. |
Assets
Lottie
117 original animations of objects, tools, weather and places. Each is drawn in five colour slots that the player swaps for the live theme, so one file serves every theme. The player loads only when an animation nears the viewport.
<div class="sy-cluster"> <span data-sy-lottie="tea-cup" style="--sy-size: 96px"></span> <span data-sy-lottie="rocket" style="--sy-size: 96px"></span> <span data-sy-lottie="windmill" style="--sy-size: 96px"></span> <button class="sy-btn sy-btn--outline"><span data-sy-lottie="check" data-sy-play="hover" style="--sy-size: 28px"></span>Hover to play</button> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-lottie | a name | Categories: loader, feedback, interface, object, abstract, business, tech, commerce, travel, nature, weather, food, tools, learning. |
data-sy-play | loop once hover click | |
--sy-size | length | |
window.SylhetConfig = { lottieSrc } | Self-host the player. |
Assets
Icons
257 icons on a 24 px grid with 1.6 px round strokes.
<div class="sy-cluster" style="font-size: 22px"><i data-sy-icon="search"></i><i data-sy-icon="bag"></i><i data-sy-icon="chart-line"></i><i data-sy-icon="tea-bud"></i><i data-sy-icon="lighthouse"></i></div>
| Name | Values | Notes |
|---|---|---|
data-sy-icon | a name | Sized by font-size, coloured by color. |
--sy-icon-stroke | number (1.6) | Stroke weight. |
data-sy-draw | Draws itself. |
Assets
Doodles
110 hand-drawn marks in 11 families: blobs behind a picture, a squiggle under a word, an arrow at a button, a stamp in a corner.
Make it yours
<p class="sy-h2">Make it <span style="position:relative">yours<i data-sy-doodle="squiggle-2" data-sy-draw style="position:absolute;left:0;right:0;bottom:-.3em;--sy-size:100%"></i></span> <i data-sy-doodle="spark-2" style="--sy-size:.9em;color:var(--sy-signal)"></i></p>
| Name | Values | Notes |
|---|---|---|
data-sy-doodle | blob-N squiggle-N ring-N arrow-N star-N spark-N stamp-N divider-N bauhaus-N scribble-N corner-N | Coloured by color (accent by default). |
--sy-size | length | Width. |
Assets
Patterns
25 motifs: eight from Sylhet and seventeen from the rest of the world, each a single-colour tile that takes any colour.
<div class="sy-auto" style="--sy-min: 130px"> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="woven-mat" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The cool mat woven from murta cane in Sylhet, on the UNESCO intangible heritage list. A basket weave.">woven-mat · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="tea-rows" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Tea garden rows on a slope: two leaves and a bud, repeated the way bushes are planted.">tea-rows · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="stone" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="River stones at Jaflong, where the Piyain comes down from the hills.">stone · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="rain" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Monsoon rain. Sylhet is among the wettest places on earth.">rain · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="woven-diamonds" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The stepped temple border of Manipuri handloom, woven in Sylhet and Moulvibazar.">woven-diamonds · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="bridge" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The steel truss of Keane Bridge over the Surma, opened in 1936.">bridge · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="manuscript" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Ruled lines and the four-dot verse mark of Sylheti Nagri manuscripts.">manuscript · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="waves" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Waves: the Surma, the haors, the water that shapes the region.">waves · Sylhet</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="wave-scales" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Blue ocean waves: overlapping arcs, a wish for calm seas.">wave-scales · Japan</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="linked-circles" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Seven treasures: interlocking circles that never end.">linked-circles · Japan</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="stitch-grid" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Mending stitches: small crosses in running thread.">stitch-grid · Japan</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="star-tiles" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Cut-tile mosaic: the eight-point star of Fez and Marrakech.">star-tiles · Morocco</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="meander" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The Greek key: one line folding back on itself.">meander · Greece</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="glazed-tiles" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Tin-glazed tiles: a quatrefoil repeated across a wall.">glazed-tiles · Portugal</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="woven-stripes" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Strip weaving: blocks of stripes and zigzags, each with a name.">woven-stripes · Ghana</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="mud-cloth" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Mud cloth: rows of marks painted with fermented river clay.">mud-cloth · Mali</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="stepped-cross" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The stepped cross of Andean weaving.">stepped-cross · The Andes</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="knit-star" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The eight-petal rose knitted into Norwegian mittens.">knit-star · Norway</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="art-deco" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Art Deco fans: the geometry of the 1920s.">art-deco · Paris, New York</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="herringbone" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Tweed and parquet: the broken zigzag of woven wool.">herringbone · Britain</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="lattice" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Pierced stone screens: a lattice that lets air and light through.">lattice · India</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="blurred-weave" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="Resist-dyed silk: diamonds with a blurred, feathered edge.">blurred-weave · Uzbekistan</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="tartan" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="A sett of crossing bands, the same in warp and weft.">tartan · Scotland</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="four-petals" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="A batik of four ovals around a point, among the oldest in Java.">four-petals · Indonesia</figcaption></figure> <figure class="sy-stack" style="--sy-gap: 4px"><div class="sy-pattern" data-sy-heritage="memphis" style="height:84px;border-radius:var(--sy-radius-sm);border:1px solid var(--sy-hairline);--sy-pattern-alpha:.55;--sy-pattern-ink:var(--sy-accent)"></div><figcaption class="sy-label" title="The 1981 design group: squiggles, triangles and dots, on purpose.">memphis · Milan</figcaption></figure> </div>
Assets
Heritage art and images
Six flat scenes drawn in the theme's own colours, for wherever a page needs a picture and has no photograph yet. 50 photographs are specified in IMAGE-PROMPTS.md; pages already point at them and fall back to art until the files exist.
<div class="sy-auto" style="--sy-min: 170px"> <div class="sy-media" data-sy-art="hills" style="--sy-ratio: 16 / 10"></div> <div class="sy-media" data-sy-art="river" style="--sy-ratio: 16 / 10"></div> <div class="sy-media" data-sy-art="bridge" style="--sy-ratio: 16 / 10"></div> <div class="sy-media" data-sy-art="stones" style="--sy-ratio: 16 / 10"></div> <div class="sy-media" data-sy-art="tea" style="--sy-ratio: 16 / 10"></div> <div class="sy-media" data-sy-art="rain" style="--sy-ratio: 16 / 10"></div> </div>
| Name | Values | Notes |
|---|---|---|
data-sy-art | hills river bridge stones tea rain | |
<img data-sy-art> | Fallback if the file is missing. |
API
JavaScript API
Nothing needs to be called. window.Sylhet is there for the cases where a page wants to.
Sylhet.brief.get('theme') // read a choice
Sylhet.brief.set('theme', 'kyoto') // change it live
Sylhet.brief.all() // the whole brief
Sylhet.brief.toAttributes() // as data-sy-* text
Sylhet.options // every allowed value
Sylhet.refresh(node) // wire markup added after load
Sylhet.toast('Saved', { cue: 'success' })
Sylhet.sound.play('notify')
Sylhet.shape3d.set(el, { shape: 'gem', material: 'metal' })
Sylhet.bus.on('brief', ({ key, value }) => {})