Introduction
Sprig is a small, client-side JavaScript framework built around signals and direct DOM updates. It offers a compact runtime, .sprig single-file components, and optional form, router, and animation add-ons. Vite compiles .sprig files and builds the app; the browser runtime itself has no framework dependencies.
Sprig is intentionally a focused toolkit, not a Vue-compatible implementation. Its current APIs and limits are described throughout this guide and in Specifications and Limits.
Choose an authoring style
- Use JavaScript functions and
h()for direct DOM construction. - Use
.sprigfiles for a<script setup>, a single-root HTML-like<template>, and optional styles. - Add
sprig-framework/form,sprig-framework/router, orsprig-framework/animationonly when needed.
Continue with Quick Start or Creating an Application.