Skip to the page
Tactile UI

Kit parts

Magic lantern

A carousel built as the real object: a magic lantern in a dark room throws the slide in its gate on the wall as one soft-edged circle. The strip of pictures below is the control. Drag it, or press a picture, and the strip and the circle move together, the wall the other way because the lens flips the image.

On this page
  1. Anatomy
  2. Variants
  3. States
  4. Props and options
  5. Usage notes
  6. Accessibility
  7. Related parts

Anatomy

Each slide is mounted in a pane of the circle's film, with a decorative copy in front of it, and the panes read right to left, the way a lens throws them; the film and the strip are two views of one position, so one transform pair keeps them locked while a drag moves them. A step animates both with the Web Animations API and settles on the new index; a longer run or a wrap first covers the circle with the dark glass between two pictures, then runs the strip to its place, then uncovers the new picture. Only the slide in the gate keeps its real figure live; every other pane shows its aria-hidden copy, and the reduced-motion cross-fade lays a copy of the old picture over the new one for a moment. The object itself is an inline SVG in the part, drawn in kit tokens, and the scenes are fixed-colour SVG so the picture does not change with the page finish.

Variants

  • Two pictures only: the strip still drags and wraps
  • Starting on the last picture, where a push wraps to the first

States

  • Rest
  • Pressed
  • Focus
  • Many pictures

Props and options

NameKindDescription
labelattributeNames the lantern.
indexattribute · propertyThe slide in the gate at the start, or read and set at any time. Setting it runs that picture into the gate.
go(i)methodRun slide i into the gate. One step slides the strip; a longer run or a wrap covers the wall with the dark glass while the strip travels.
changeeventA different slide settled in the gate.
lanternLabel(i, n, name)functionPure: the words for slide i of n, e.g. "2 of 3: Harbour lights".
lanternWrap(i, n)functionPure: keeps a target index inside 0..n-1 by wrapping at either end.

Usage notes

Drag the strip to run a picture into the gate, or press one of its small pictures; the arrow keys, Home and End do the same from the keyboard, and the circle keeps up with the strip at every step.

Accessibility

  • The same WAI-ARIA pattern as the kit’s other carousel.
  • Only that slide is real and live in the accessibility tree. The small pictures in the strip, and every decorative copy, are aria-hidden and inert; each small picture sits in a named button that runs its slide into the gate and says only the slide’s name, because the plate already carries the count.
  • The strip is a row of real buttons, so a pointer and a keyboard reach the same control: drag it, press a picture, or use ArrowLeft, ArrowRight, Home and End wherever the focus sits inside the lantern.
  • The plate is a polite live region, so a screen reader hears the new slide’s place and name the moment the strip settles; nothing else repeats that text.
  • Nothing in the lantern moves on a timer: a picture changes only when the strip is moved. The one movement of its own is the lamp’s flicker, of no more than two per cent, and it stops under reduced motion.
  • Reduced motion drops the travel and the flicker: the strip jumps straight to its new place and the wall cross-fades from the old picture to the new one, so the change is still seen, just not travelled.

Carousel

Slides seen one at a time through a viewer’s gate: transport keys either side of a frame counter on an LCD, lamp keys to jump, swipe on touch. Nothing moves on its own unless you ask it to.

Film strip

A carousel as a strip of film in a machined viewer. The frames run behind a gate lit from behind, with sprocket holes along both edges, and the frames either side wait under a smoked cover. It moves a frame at a time and settles as each one registers. Turn the thumbwheel, press the keys or swipe the film itself: underneath it is a native scroller with a snap point at every frame.

Key

Every button, and every link that acts like one: a cap on a skirt that drops below the plate when pressed.