# Motion components: API, options and examples (runtime/components) Read this when you are building an HTML/DOM video page (`showtime new dom|short|data`) and want titles, captions, lower thirds, stats, charts, code, browser or device frames, a cursor, chat or notification UI, a checklist, a Ken Burns still, a map, an end card or a WebGL look (fluted glass, tilt-shift, liquid metal, mesh gradient, god rays, marble, metaballs). For scene-to-scene handoffs read `references/transitions.md`; for timing and taste read `references/motion-craft.md`. Run `showtime motion` for the live list. ## Essentials - A logo sting, lower third or title for an editor: render it transparent, `showtime render --alpha animation` (flat graphics, small files) or `--alpha prores` (`showtime render --help`) - Setup: `/_st/stage.js`, a theme CSS, then `/_st/components/index.js` as a module. Any element with `data-st=""` mounts itself; options are kebab-case `data-*` (`data-exit-at` = `exitAt`) or JSON (§1) - `at` is seconds local to the clip the component sits in (the nearest ancestor with `data-start`); every other time option (`cues`, `exitAt`, `path[].at`, `states[].at` ...) counts from the component's `at` (§1) - A title already on screen at t=0: `data-style="none"` (kinetic-type), never a negative `at` (it shifts every exit too) (§1) - Seek-safe: components are pure functions of time, with no timers, CSS transitions or accumulated state; your own components follow the same rules (compute from `lt`, measure in `setup` only) (§1, §8) - Size in container units (`cqw`, `cqh`, `cqmin`) so one page works at 16:9, 9:16 and 1:1; a padded `.scene` shrinks them, so set `.scene { padding: 0 }` or pad an inner wrapper (§1) - Frame-exact cuts: `data-start`/`data-dur` within 1 ms of a frame boundary land on it (`7.0667` is frame 212 at 30 fps), so write beat-synced cuts with 4 decimals (§1) - Put SFX and narration on `sync` beats (`count-up.sync.land`, `cursor.sync.click1`) after `await c.ready`; videos inside components are muted `