Function: Deck()
Deck(
props):Element
Defined in: deck.tsx:88
@habemus-papadum/aiui-slides — the slides framework: a deck of viewport-sized slides, moved one FRAME at a time, as an ordinary aiui app.
The shape (docs/proposals/slides.md is the decided contract, scenes addendum included):
- Slides are data (SlideDef[]) and the current frame is a pair of controls (createDeckModel:
slide+ scenestep) — durable, agent-drivable ("next" by voice through the derived tools), reported like any control. A slide declaressteps: nto play n additive scenes inside itself before the deck moves on. - Every input means one frame. Deck interprets wheel and touch through pure intent machines (gestures.ts — one flick, notch, or finger-down = one step), and keyboard, cue, dots, and agent verbs dispatch the same unit — nothing can blow past an unplayed scene. Slides ride a translated track with a CSS glide (no native scroll); scenes are CSS state flips (Step cans the additive idiom over
useSlide().step()). - The chrome: the bobbing ScrollCue (immediate on the title frame, back after 10 s of rest, pointing wherever a step remains), the StepDots scene-position dots, the DeckNav widget (a keyboard is never assumed; taps execute through the live keymap so widget and keys cannot drift), the DeckHud overview grid (slide-grained on purpose — scenes are a slide's interior), and the modal-kit key layers (keys.ts).
- URL binding (path-binding.ts): slide ↔ pathname tail over aiui-viz's shared pathname signal — deep-linkable at every moment, replaceState so history stays sane, composing with a shell router that keys on the head. Slide-grained, like the HUD.
- Lens — levels of detail for any page, deck or not: inline trigger → hover peek → interactive detail overlay, all in the page's own reactive graph.
Default styling is the opt-in ./styles.css (token-overridable aiui-deck-* / aiui-lens-* classes). The reference deck is demos/gear-talk.
Parameters
props
basePath?
string
Bind slides to the URL under this base path (see path-binding.ts; compute it with deckBase(slug)). Omit for an unrouted deck.
class?
string
cue?
boolean
Set false to drop the bobbing one-step cue (scroll-cue.tsx).
dots?
boolean
Set false to drop the scene dots (step-dots.tsx).
model
nav?
boolean
Set false to drop the nav widget (keyboard/agent-only decks).
Returns
Element