GitHub

Animated Image

GIF/video player with play/pause controls.

<rhx-animated-image>

Examples

Play/Pause

Animated loading

Initially Paused

Paused animation

Properties

Property Type Default Description
rhx-src string - URL of the animated image or video
rhx-alt string - Alt text for the image
rhx-play bool true Whether the animation starts playing

Accessibility

  • Play/pause button has an aria-label that updates to reflect the current state ("Pause animation" / "Play animation").
  • The image element receives alt text from rhx-alt for screen reader users.
  • Respects the prefers-reduced-motion media query by starting in a paused state.