Lab

Loader

Slant / Loaders

Nine CSS 3D figures built from the slanted pixel, one component: pick a variant and the stage redraws, in any theme.

The theme follows the link: share a page with ?theme=moon.

Usage

  • <Loader variant="helix" /> draws one of nine figures; loaderVariants lists them in order. It fills its parent, so size the parent.
  • running={false} freezes it at the current frame; the piece passes it while the stage is off screen or paused.
  • Pure CSS 3D on the web; SlantLoader(variant:) draws the same figures with Canvas and TimelineView in SwiftUI.

Keyboard

← / → / ↑ / ↓moves to the previous or next variant
Tabmoves between the variants and the pause button
Enter / Spacepauses or plays the loader

Accessibility

  • Decorative unless given a label: hidden from assistive technology, so pair it with a text status.
  • It stops off screen, and under reduced motion every figure rests in a composed frame.
  • The pause button exposes its state with aria-pressed.

Loader in React and SwiftUI.

Source

The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.