SIMT Design
SPECIFICATION Cosmos 2.4.0Plain text

@SIMT-DEV/WEB-UI

Web UI playground

Framework-agnostic controls and motion primitives from the published @simt-dev/web-ui package source, running locally with no network or storage dependency.

Actual package source · isolated same-origin iframeOpen standalone

COMPONENT CATALOG

Every authored example, generated.

The cards below come from the package preview manifest. Their source references and contracts are rendered beside the example, so adding a component never requires editing the Design page template.

01

Actions and icon buttons

Primary, ghost, outline, halo and size variants use the package stylesheet directly. Icon controls keep an accessible name and a 44px target.

Usage

<button class="button button--primary" type="button">Launch orbit</button>
<button class="icon-button" type="button" aria-label="Favorite">
  <svg aria-hidden="true" viewBox="0 0 24 24">…</svg>
</button>
02

Ambient marquee

The duplicated track loops only in full motion, pauses on hover and stops whenever its ambient container is offscreen.

Usage

<div class="marquee" data-ambient>
  <div class="marquee__viewport">
    <div class="marquee__rail">
      <ul class="marquee__track">…</ul>
      <ul class="marquee__track marquee__track--clone" aria-hidden="true">…</ul>
    </div>
  </div>
</div>
03

Staggered reveals

IntersectionObserver adds the revealed state once. Reduced motion keeps every card visible without a transition.

Usage

<div class="stagger">
  <article data-reveal>…</article>
  <article data-reveal>…</article>
  <article data-reveal>…</article>
</div>
04

Native animated accordions

Semantic details and summary cards animate their disclosure height where supported. Reduced motion, Lite mode and unsupported browsers keep native instant disclosure.

Usage

<section class="faq" aria-labelledby="faq-title">
  <div class="container faq__grid">
    <header class="faq__heading"><h2 id="faq-title">Questions</h2></header>
    <div class="faq__list">
      <details class="faq-item">
        <summary><span class="faq-item__q">Question</span><span class="faq-item__icon" aria-hidden="true">+</span></summary>
        <div class="faq-item__a"><p>Answer</p></div>
      </details>
    </div>
  </div>
</section>
05

Pointer scene

A fine pointer moves the lantern and tilt variables through requestAnimationFrame. Touch, Reduced and Lite modes stay still.

Usage

initPointerScene({
  area: document.querySelector('[data-pointer-area]'),
  bounds: document.querySelector('[data-pointer-area]'),
  spotlight: document.querySelector('[data-pointer-spotlight]'),
  tilt: document.querySelector('[data-pointer-tilt]'),
});
06

Preference and performance state

The runtime reports the active theme, motion and performance tier. Save-data, low-memory, low-core and slow-frame probes can select Lite automatically.

Usage

detectPerformance();
initTheme(document.querySelector('[data-theme-toggle]'));
initMotion(document.querySelector('[data-motion-toggle]'));
initLocaleSelect(document.querySelector('[data-locale-select]'));
trackHeader(document.querySelector('[data-header]'));
trackSections(document.querySelectorAll('[data-nav-link]'));

INTEGRATION

Use the public entry points.

The playground imports the package root, exactly as a consumer does. Browser storage remains a separate optional adapter and is not loaded here.

import {
  detectPerformance,
  initMotion,
  initPointerScene,
  initLocaleSelect,
  initTheme,
  observeReveals,
  pauseOffscreen,
  trackHeader,
  trackSections,
} from '@simt-dev/web-ui';
import '@simt-dev/web-ui/styles.css';

detectPerformance();
initTheme(document.querySelector('[data-theme-toggle]'));
initMotion(document.querySelector('[data-motion-toggle]'));
initLocaleSelect(document.querySelector('[data-locale-select]'));
observeReveals(document.querySelectorAll('[data-reveal]'));
pauseOffscreen(document.querySelectorAll('[data-ambient]'));
trackHeader(document.querySelector('[data-header]'));
trackSections(document.querySelectorAll('[data-nav-link]'));
initPointerScene({ area: document.querySelector('[data-pointer-area]') });

RUNTIME CONTRACTS

Behavior is explicit.

theme

Theme preference

initTheme

motion

Motion preference

initMotion

reveal

Viewport reveals

observeReveals

ambient

Offscreen pause

pauseOffscreen

header

Scrolled header

trackHeader

sections

Active section

trackSections

pointer

Pointer scene

initPointerScene

performance

Performance tier

detectPerformance

AUTOMATIC COVERAGE

New source appears without a template edit.

The build publishes every .mjs and .css file under src/, lists every root export and compares declared CSS classes with the preview markup. A new component needs only a manifest entry; until then, its source remains visible in this coverage report.

69CSS classes discovered
0Root exports discovered
13Source files published
Inspect undemonstrated surface

CSS classes

.brand .brand__mark .brand__product .brand__simt .brand__word .button--xl .card .card--accent-top .card--outline .card--rim .finale .finale__actions .finale__body .finale__corona .finale__fine .finale__inner .finale__mark .finale__title .is-offscreen .is-revealed .is-scrolled .js .locale-switch .locale-switch__links .locale-switch__select .scroll-to-top .scroll-to-top--start .site-footer .site-footer--stacked-brand .site-footer__bottom .site-footer__brand .site-footer__nav .site-footer__note .site-footer__title .site-footer__top .site-header .site-header__cta .site-header__inner .site-header__tools .site-nav

Root exports

Every root export is initialized by a playground feature.

Source files