AVAL is a web-only format and runtime for short prerendered animation with continuous partial loops, user-defined states, authored triggers, and host-owned fallback markup.

Stars

1,313

7-day growth

No data

Forks

75

Open issues

2

License

MIT

Last updated

2026-07-23

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It introduces a deterministic state graph to replace video seeking, enabling efficient looped interactivity and SSR-safe embedding in modern web applications.

Who it is for

  • Web developers building interactive UI animations
  • Animation tooling and framework authors
  • Performance-conscious frontend engineers
  • Designers creating micro-interactions

Use cases

  • Implementing hover and focus transitions without manual seek logic
  • Building stateful loading, success, or error animations with minimal code
  • Serving accessible animations with fallback for reduced motion or unsupported codecs
  • Embedding deterministic animations inside SSR frameworks without layout shift

Strengths

  • Deterministic latest-wins state engine ensures predictable animation routes
  • SSR-safe custom element with explicit registration and no unwanted side effects
  • Capability-probed fallback to host-owned markup when WebCodecs/WebGL/AVC are unsupported
  • Continuous decoder timeline avoids seeking, offering seamless looping transitions

Considerations

  • Early technical preview – format and APIs may change without notice
  • Requires external FFmpeg/FFprobe and libx264 for compilation; no bundled codecs
  • Currently limited to AVC (H.264); H.265, AV1, VP9, and Safari support are planned but not yet available

README quick start

AVAL

AVAL is a web format and runtime for short prerendered motion with continuous loops, named application states, authored triggers, bounded transitions, reversals, and packed transparency.

One logical animation is published as a codec bundle. Each codec gets its own AVAL wire 1.1 file—AV1, VP9, H.265/HEVC, or H.264—and the browser selects the first candidate in AVAL's fixed AV1 → VP9 → H.265 → H.264 ladder that decodes and passes pre-readiness output qualification. DOM source order does not change that policy. The state graph and authored timing are identical in every file.

Required application error handling

Every AVAL integration must own its unsupported-browser and fatal-error path. A browser may lack the required WebCodecs interfaces, every authored codec may be unsupported, or another terminal playback failure may stop the source generation. In those cases prepare() rejects with AvalPlaybackError and the element raises one fatal error event with failure.code set to a value such as unsupported-profile or unsupported-browser.

AVAL deliberately does not create, select, reveal, or hide fallback content. The application must decide whether to show an ordinary video, image, text, another renderer, or nothing. Install the element's direct error listener before explicit registration so an upgrade-time failure cannot outrun the application boundary, and handle the rejected prepare() promise when calling it directly. Branch on failure.code; do not parse the error message. The browser-integration example below demonstrates this required boundary.

Five-minute start

npm install @pixel-point/aval-element@1.0.0
npm install --save-dev @pixel-point/aval-compiler@1.0.0
npx avl init my-motion
cd my-motion
npm install
npm run dev

Here npx avl resolves the avl executable from the compiler package installed on the preceding line. The generated starter contains its RGBA frames, project 1.0 file, four codec encoding policies, consumer-owned error handling, and watch workflow.

For a normal build, the compiler publishes a directory rather than a single output file:

npx avl compile motion.json --out dist/motion
dist/motion/
  av1.avl
  vp9.avl
  h265.avl
  h264.avl
  build.json

Browser integration

Use literal direct-child sources with one required lowercase data-codec family per file. AVAL derives

Description

A new open-source format for interactive video on the web, with a built-in state machine, frame-accurate transitions, and packed-alpha transparency.

Related repositories

Similar projects matched by category, topics, and programming language.

TanStack
Featured
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web DevelopmentFrontend Frameworks
14,861
vercel-labs
Featured
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

Developer ToolsCode Quality & Build
1,985
Jakubantalik
Featured
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI & Machine LearningAI Agents
1,191