Skip to content
Sylhet

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">
NameValuesNotes
data-sy-themeultramarine 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 tokyoWhich colours? Each theme is a place: its paper, its ink, one accent. Default ultramarine.
data-sy-schemelight darkLight or dark? Default light.
data-sy-typeultramarine editorial grotesk soft bold mono noteWhat should the words look like? Default ultramarine.
data-sy-shapesoft sharp roundCorners? Default soft.
data-sy-motionstill calm lively immersiveHow much should move? Default lively.
data-sy-soundpaper wood water glass stone keys silentWhat should the interface sound like when sound is on? Default paper.
data-sy-ambientnone rain river tea-gardenA quiet background bed? Default none.
data-sy-textrise words chars fade blur drop flip slide skew type scrambleHow should headlines arrive? Default rise.
data-sy-imagecurtain slide iris blinds dots ink zoom diag split pixel shutter frame foldHow should pictures arrive? Default curtain.
data-sy-hoverzoom lift tint reveal pan noneWhat happens when a picture is hovered? Default zoom.
data-sy-tonenatural mono tint duoShould photographs take the theme colour? Default natural.
data-sy-sceneshrink curtain iris shutter split lift knockout dive panWhen a full-screen picture hands over to text on scroll, how? Default shrink.
data-sy-cursornone ring blobA companion cursor on desktop? Default ring.
data-sy-heritagewoven-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 memphisWhich 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.

paper sheet sunk ink ink-soft accent signal
<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>
NameValuesNotes
--sy-paper / --sy-sheet / --sy-sunkgroundsThe page, surfaces on it, wells in it.
--sy-ink / --sy-ink-soft / --sy-ink-fainttextPrimary, secondary, placeholder. Ink on paper is at least 7:1.
--sy-accent / --sy-on-accent / --sy-accent-softaccentThe one colour. on-accent is picked from its lightness, so any accent stays legible.
--sy-signal / --sy-on-signalsignalTags, a marker swipe, a dot. Never body text.
--sy-line / --sy-hairline / --sy-tracklinesInk at 14 %, 8 %, 11 %.
--sy-good / --sy-warn / --sy-badstatusSuccess, warning, error.
data-sy-scheme="dark"any elementFlips 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>
NameValuesNotes
--sy-hue, --sy-tintnumberHue and chroma shared by paper and ink.
--sy-accent-h, --sy-accent-cnumberAccent hue and chroma.
--sy-accent-l, --sy-accent-ld0–1Accent lightness on light, and on dark.
--sy-signalcolourThe 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>
NameValuesNotes
.sy-mega .sy-display .sy-h1 .sy-h2 .sy-h3displayFluid sizes; each carries its own leading and tracking.
.sy-lead .sy-body .sy-small .sy-labeltextLead, body, small, mono label.
.sy-accentphraseThe accent phrase. One per heading.
.sy-mark .sy-link .sy-underlineinlineMarker, link, drawn underline.
.sy-bn .sy-manuscriptscriptBengali (Hind Siliguri) and Sylheti Nagri (Noto).
data-sy-typeultramarine editorial grotesk soft bold mono noteThe 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.

auto
auto
auto
<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>
NameValuesNotes
.sy-container--narrowPage column with fluid gutters (max 1320 px).
.sy-section--tightVertical rhythm, 64 to 120 px.
.sy-frameAn inset rounded surface that floats inside the viewport edge.
.sy-stack / .sy-cluster / .sy-between--sy-gapColumn, wrapping row, ends apart.
.sy-grid + .sy-col-3…12Twelve columns; stacks under 860 px.
.sy-auto--sy-minAs many equal columns as fit.
.sy-split--sy-splitTwo columns that stack on small screens.
.sy-bento + .sy-wide .sy-half .sy-tallA six-column mosaic of cards.

Foundations

Grounds and patterns

Surfaces for sections, and the heritage motif as a ground or a border strip.

.sy-pattern
.sy-glow
<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>
NameValuesNotes
.sy-on-sheet .sy-on-sunk .sy-on-accentSection grounds.
.sy-glow .sy-gridlines .sy-grainAccent glow, hairline grid, film grain (on <body>).
.sy-pattern--sy-pattern-alpha, --sy-pattern-ink, --sy-pattern-sizeThe motif as a background.
.sy-pattern-strip--sy-stripThe motif as a border.
data-sy-heritage25 motifsOn <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>
NameValuesNotes
.sy-btn--accent --outline --ghost --sheetDefault is ink.
size--sm --lg --icon36, 44 (default) and 56 px tall.
data-sy-magnetic0–1Pulls toward the pointer.
data-sy-cuea cue or noneOverride or silence its sound.

Components

Tag, dot, key

Small facts.

TagSolidAccentSignal Live⌘KNH
<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

Nav and menu

A floating pill that hides on the way down and returns on the way up. Under 760 px the links move into a full-screen menu.

<header class="sy-nav" data-sy-autohide>
  <a class="sy-nav__brand" href="/">Brand</a>
  <nav class="sy-nav__links"><a href="#a">Work</a><a href="#b">About</a></nav>
  <button data-sy-sound-toggle></button>
  <a class="sy-btn sy-btn--accent" href="#c">Contact</a>
  <button class="sy-btn sy-btn--ghost sy-btn--icon sy-nav__menu" data-sy-menu-toggle aria-label="Menu"><i data-sy-icon="menu"></i></button>
</header>
<nav class="sy-menu" aria-label="Menu"><a href="#a">Work</a><a href="#b">About</a></nav>

Components

Card

A sheet for one idea. Make it an <a> and it lifts on hover.

Link card

Lifts on hover.

Tag

Sunk

Ink

Accent

<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>
NameValuesNotes
.sy-card--plain --sunk --ink --accent --lift
.sy-card__footPinned to the bottom.
data-sy-tiltdegreesLeans 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.

A caption
<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>
NameValuesNotes
.sy-media--sy-ratioDefault 4 / 3.
data-sy-imagecurtain slide iris blinds dots ink zoom diag split pixel shutter frame foldEntrance. Empty takes the brief.
data-sy-hoverzoom lift tint reveal pan noneHover. Empty takes the brief.
data-sy-tonenatural mono tint duoRe-tone a photograph to the theme.
data-sy-arthills river bridge stones tea rainHeritage 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>
NameValuesNotes
--sy-row-colsgrid columnsDefault 3.5rem 1fr auto.
data-sy-previewimage URL or art:nameCursor preview.
data-sy-cursor-labeltextLabel inside the cursor.

Components

Stat and quote

A number that counts up when it is first seen, and a pulled quote.

117animations
99.9%uptime

“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.

As you would like to be addressed.
<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.

<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.

A dialog

Escape or the backdrop closes it.

<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>
NameValuesNotes
data-sy-open="id"Opens that dialog.
data-sy-closeCloses the dialog it is in.
data-sy-toast="text"data-sy-toast-cueShows a toast.
Sylhet.toast(text, { cue, duration })From script.

Components

Table, code, progress

For documents and dashboards.

PlanSeatsPrice
Starter5$0
TeamUnlimited$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>
NameValuesNotes
data-sy-sound-toggleAny button. Remembers the choice.
.sy-gatedata-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.

NameValuesNotes
stillNothing travels. State changes are instant.
calmReveals, image entrances, counters.
livelyPlus text effects, scramble, magnets, tilt, parallax, word fill, scenes, pinned runs, the cursor.
immersivePlus the gate and the page curtain.
--sy-dur-1…5120 240 480 800 1200 msDurations.
--sy-ease-out / soft / io / heavy / springCurves.

Motion

Reveal

An element arrives when it enters the viewport. A group staggers its children.

one
two
three
scale
blur
<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>
NameValuesNotes
data-sy-revealup left right scale blur clip fade
data-sy-reveal-groupa reveal kindStaggers direct children.
--sy-delaytimeExtra 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>
NameValuesNotes
data-sy-textrise words chars fade blur drop flip slide skew type scramble stretch wave highlight gradientEmpty takes the brief.
--sy-text-staggertimeDelay between units.
data-sy-splitlines words charsOlder spelling of rise / words / chars.

Motion

Image entrances

Thirteen ways for a picture to arrive.

curtain
slide
iris
blinds
dots
ink
zoom
diag
split
pixel
shutter
frame
fold
<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>
NameValuesNotes
data-sy-imagecurtain slide iris blinds dots ink zoom diag split pixel shutter frame foldOn .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.

zoom
lift
tint
Caption
reveal
pan
<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>
NameValuesNotes
data-sy-hoverzoom lift tint reveal pan none
data-sy-tonenatural mono tint duoFor 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>
NameValuesNotes
data-sy-sceneshrink curtain iris shutter split lift knockout dive panEmpty takes the brief.
--sy-scene-lengthheightScroll length, default 260vh.
DemoOpen 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.

Scramble me
<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>
NameValuesNotes
data-sy-magnetic0–1 (0.3)
data-sy-tiltdegrees (9)Children with data-sy-depth float above.
data-sy-scrambleenter or on hover
data-sy-cursor-labeltextTurns the cursor into a labelled disc.
data-sy-cursornone ring blobOn <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.

Marqueekeeps goingMarquee
<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>
NameValuesNotes
data-sy-fillWord fill, linked to reading position.
data-sy-parallaxamount (0.2)Drifts against the scroll.
.sy-marquee > .sy-marquee__track--sy-speed, data-reverseSeamless loop; pauses on hover.
.sy-pinx > __stage > __trackA pinned horizontal run of cards.
.sy-orbit > .sy-orbit__ring--sy-speedItems on a turning 3D ring.
.sy-scrollbarA 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>
NameValuesNotes
data-sy-drawon enter, or hoverOn 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>
NameValuesNotes
hover / clickLinks, buttons, summaries.
toggleOn / toggleOffCheckboxes, switches.
open / close<details>, dialogs, the menu.
success / errorA valid submit, an invalid field.
whoosh / notifyThe page curtain, toasts.
data-sy-cuea cue or noneOverride 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>
NameValuesNotes
paperpaperRecorded with ElevenLabs, trimmed and levelled.
woodwoodRecorded with ElevenLabs, trimmed and levelled.
waterwaterRecorded with ElevenLabs, trimmed and levelled.
glassglassRecorded with ElevenLabs, trimmed and levelled.
stonestoneRecorded with ElevenLabs, trimmed and levelled.
keysmechanical keysSynthesised live, no files.
rainrain22 s loop, cross-faded over its own seam.
riverriver22 s loop, cross-faded over its own seam.
tea-gardentea garden22 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.

orb · clay
blob · glass
torus · metal
cube · ink
gem · clay
pill · glass
rings · metal
<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>
NameValuesNotes
data-sy-shape3dorb blob torus cube gem pill rings
data-sy-materialclay glass metal ink
data-sy-colorsignalUse 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.

aurora
terrace
rain
river
<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>
NameValuesNotes
data-sy-backdropaurora terrace rain riverOn .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>
NameValuesNotes
data-sy-lottiea nameCategories: loader, feedback, interface, object, abstract, business, tech, commerce, travel, nature, weather, food, tools, learning.
data-sy-playloop once hover click
--sy-sizelength
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>
NameValuesNotes
data-sy-icona nameSized by font-size, coloured by color.
--sy-icon-strokenumber (1.6)Stroke weight.
data-sy-drawDraws 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>
NameValuesNotes
data-sy-doodleblob-N squiggle-N ring-N arrow-N star-N spark-N stamp-N divider-N bauhaus-N scribble-N corner-NColoured by color (accent by default).
--sy-sizelengthWidth.

Assets

Patterns

25 motifs: eight from Sylhet and seventeen from the rest of the world, each a single-colour tile that takes any colour.

woven-mat · Sylhet
tea-rows · Sylhet
stone · Sylhet
rain · Sylhet
woven-diamonds · Sylhet
bridge · Sylhet
manuscript · Sylhet
waves · Sylhet
wave-scales · Japan
linked-circles · Japan
stitch-grid · Japan
star-tiles · Morocco
meander · Greece
glazed-tiles · Portugal
woven-stripes · Ghana
mud-cloth · Mali
stepped-cross · The Andes
knit-star · Norway
art-deco · Paris, New York
herringbone · Britain
lattice · India
blurred-weave · Uzbekistan
tartan · Scotland
four-petals · Indonesia
memphis · Milan
<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>
NameValuesNotes
data-sy-arthills 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 }) => {})