Packages
Which packages do I actually need?
Usually a build integration plus the runtime. Events, DOM and reactive utilities are optional and independent. All packages below are on npm, are pre-1.0, and are versioned independently.
Common setups
Astro templates
sh npm install @flowview/astro @flowview/runtimeEmbedded <template flowview> regions and standalone .flow imports.
Astro templates and Events
sh npm install @flowview/astro @flowview/astro-events @flowview/events @flowview/vite-events @flowview/runtime@flowview/astro-events lists the Events packages as peers, so install them directly.
Vite templates
sh npm install @flowview/vite @flowview/runtimeUse it for Hono, Node.js, Workers or any Vite-built server.
Vite templates and Events
sh npm install @flowview/vite @flowview/vite-events @flowview/events @flowview/runtimeAdd vite-events before vite in the plugin list.
Client rendering
sh npm install @flowview/dom @flowview/vite @flowview/runtimecreateView() plus a compiled .flow render function.
Optional state
sh npm install @flowview/reactiveIndependent of the compiler and the DOM package.
Core
The compiler and the tiny helpers its output imports.
-
flowview-compiler (Rust)
Rust · from Git- Owns
- The parser, the JavaScript backend and the native static HTML backend (compile_static).
- Install when
- You are embedding FlowView in a Rust tool, or rendering templates to HTML with no JavaScript engine. Not yet published on crates.io, so depend on it from Git or a path.
- Does not own
- Routing, Markdown, file watching or an arbitrary JavaScript engine. The static backend evaluates only a small, deterministic expression subset.
- Install command
cargo add --git https://github.com/Andersseen/flowview flowview-compiler
-
@flowview/compiler
On npm- Owns
- The bundled WASM build of the compiler, for tools written in JavaScript. No Rust toolchain required.
- Install when
- You are building your own bundler plugin or script. Vite and Astro users get it through @flowview/vite.
- Does not own
- Static HTML rendering (the WASM wrapper does not expose it yet) or any host integration.
- Install command
npm install @flowview/compiler
-
@flowview/runtime
On npm- Owns
- The small helpers that compiled render functions import, such as value escaping.
- Install when
- Any project that runs compiled .flow output in JavaScript. Install it directly so your build can resolve the import.
- Does not own
- State, DOM access or a template engine of its own.
- Install command
npm install @flowview/runtime
Integrations
Teach a build tool to compile .flow files and embedded templates.
-
@flowview/vite
On npm- Owns
- Compiling .flow imports to render(context) modules, with source maps. Vite 6, 7 and 8.
- Install when
- Vite apps, and server frameworks built on Vite such as Hono, Node.js or Cloudflare Workers projects.
- Does not own
- Serving, routing or deciding when your server calls render().
- Install command
npm install @flowview/vite @flowview/runtime
-
@flowview/astro
On npm- Owns
- <template flowview={context} is:raw> regions inside .astro files, plus standalone .flow imports. Astro 5, 6 and 7.
- Install when
- You author Astro pages or components and want control-flow templates.
- Does not own
- Astro's own components, islands or hydration.
- Install command
npm install @flowview/astro @flowview/runtime
Events
Optional (event) bindings, compiled separately from the HTML templates.
-
@flowview/events
On npm- Owns
- The Events compiler core and the small delegated browser runtime behind (click), (input) and friends.
- Install when
- Whenever you use (event) bindings. Host plugins list it as a peer or direct dependency.
- Does not own
- HTML compilation. The Rust compiler never parses (click); the Events compiler rewrites it first.
- Install command
npm install @flowview/events
-
@flowview/vite-events
On npm- Owns
- Events for Vite projects. Runs before @flowview/vite and serves each <script data-flowview> block as a virtual module.
- Install when
- Vite or Hono apps that want (event) bindings in .flow files.
- Does not own
- Injecting the client script tag into your server's HTML response.
- Install command
npm install @flowview/vite-events @flowview/events
-
@flowview/astro-events
On npm- Owns
- Events for .astro files and .flow imports in Astro, including View Transitions.
- Install when
- Astro sites that want (event) bindings.
- Does not own
- State management. Handlers are ordinary functions in your script block.
- Install command
npm install @flowview/astro-events @flowview/events @flowview/vite-events
Optional client utilities
Small, independent building blocks for browser UIs. Neither is required by the compiler.
-
@flowview/dom
On npm- Owns
- createView(target, render) with render() and update(). Both replace the target's HTML.
- Install when
- You render a compiled .flow template into an element in the browser.
- Does not own
- State, reactivity, DOM diffing or a virtual DOM.
- Install command
npm install @flowview/dom
-
@flowview/reactive
On npm- Owns
- signal(), computed(), effect() and untracked(). Usable with or without FlowView.
- Install when
- You want fine-grained state and would rather not call view.update() by hand.
- Does not own
- Template reactivity. Templates never track signals; your effect() calls view.update().
- Install command
npm install @flowview/reactive
Tooling
Editor and formatting support.
-
@flowview/prettier
On npm- Owns
- Formatting .astro files while leaving FlowView template regions untouched. Prettier 3.
- Install when
- Your Astro project uses Prettier.
- Does not own
- Reformatting the contents of FlowView templates.
- Install command
npm install -D prettier @flowview/prettier
-
VS Code language support
From the repository- Owns
- .flow syntax highlighting, snippets, highlighting inside Astro template regions and raw interpolation.
- Install when
- Included in the repository as a local extension. It is not published to the Marketplace.
- Does not own
- Diagnostics, completion, hover or go-to-definition.
-
flowview CLI (Rust)
From the repository- Owns
- Compiling a template to JavaScript or rendering it to static HTML from the command line.
- Install when
- Build it from the repository with cargo run -p flowview-cli. It is not distributed as a binary.
- Does not own
- Project scaffolding, watching or bundling.