Specifications and Limits
This page reflects the framework's current specification and implementation status. Recommended targets that are not implemented or verified are not release promises.
Implemented
- Fine-grained signals, computed getters, synchronous effects, cleanup roots, and reactive proxies for plain objects and arrays.
- Direct DOM helpers, reactive children and properties, native event cleanup, component mounting/disposal, and keyed list reconciliation.
- Vite compilation of
.sprigsingle-file components with the documented template subset, global/scoped styles, slots, and component imports. - Optional
sprig-framework/routeradd-on with hash routing, opt-in History API routing, parameterized file routes, nested layouts, and lazy route loading; the core also provides a load-on-visible helper. - An optional
sprig-framework/formadd-on for form values, validation, touched state, async submission, and reset. - An optional
sprig-framework/dialogadd-on for a message dialog with Cancel/OK results and Sprig-owner cleanup. - An optional
sprig-framework/dialogadd-on for a message dialog with Cancel/OK results and Sprig-owner cleanup. - An optional
sprig-framework/animationadd-on for Web Animations API playback, explicit transitions, opt-in page/@if/@forlifecycle transitions, Sprig owner cleanup, and reduced-motion handling. - Optional TypeScript declarations for the public API; TypeScript is not required to use the JavaScript runtime.
Current boundaries
- The
.sprigVite plugin is an internal repository source module, not a package export. See Getting Started for the repository build and integration setup. - Sprig is browser-oriented and client-rendered. Server-side rendering and hydration are not implemented.
- The template compiler supports a focused subset and JavaScript-only
<script setup>blocks. It is not a full Vue/Svelte compiler; JSX, arbitrary two-way binding expressions, automatic transitions without importing/enabling the add-on, and accessibility automation are not provided. See the animation add-on for opt-in lifecycle transitions. - File-route parameters match one segment. Catch-all file routes are not supported.
- History-mode deployments need a server-side
index.htmlfallback for direct visits and refreshes. - There is no built-in HTTP wrapper. Use the browser's
fetch()or another application-level choice. - The example Python
http.serverAPI is local-only and has no authentication or per-user authorization. It must not be exposed publicly. - Tree-shaking is verified for the public entries with Vite production-consumer tests; other bundlers/configurations are not exhaustively verified. Runtime-size and broader code-splitting recommendations remain targets.
For the detailed source specification, see the repository's SPECS.md.