# WildflowerJS: Full Documentation Corpus > WildflowerJS is a reactive JavaScript framework that uses standard HTML, CSS, and JavaScript without a build step, virtual DOM, or custom syntax. This file concatenates the complete documentation, including every example's HTML and JavaScript, for agents and tools that want the full corpus in one fetch. For a condensed single-fetch reference optimized for code generation, use https://www.wildflowerjs.com/llms.txt instead. Generated from the documentation pages. Do not edit by hand: scripts/generate-llms-full.cjs rebuilds it. ====================================================================== # SECTION: Getting Started ====================================================================== --- # Introduction to WildflowerJS > Source: https://www.wildflowerjs.com/getting-started/introduction Full reactivity using nothing but standard HTML and JavaScript. There is no proprietary syntax, build step, or vendor lock-in. Other frameworks require you to learn and commit to non-standard extensions: JSX, `.vue` single-file components, Svelte's `$:` labels, Angular's template compiler. WildflowerJS achieves the same reactive data binding, computed properties, conditional rendering, and list management using only `data-*` attributes and plain JavaScript. Things browsers already understand. **What You Get (Without Leaving Standard HTML & JS):** - Reactive state: mutate a property, the DOM updates automatically - Declarative binding via native `data-*` attributes: `data-bind`, `data-show`, `data-list`, `data-model`, `data-action` - Computed properties with automatic dependency tracking, including async ones that return a promise - List rendering with keyed reconciliation and nested lists, plus `data-pool` for high-frequency collections - Server data as a declaration: `data-query` fetches it, keeps it fresh, and sends writes with optimistic updates and rollback - Components, routing, SSR, and stores: all in one zero-dependency bundle - No build step or npm required: add a ` ``` #### Server Data as a Declaration Name a source, point an element at it, and say how fresh it should stay. The framework tracks loading and error states, refreshes on demand, discards responses that arrive out of order, and can poll, revalidate, or subscribe to a server push stream. Declare `to` and the same query sends changes back: `write()` puts them on screen immediately and rolls back the fields it changed if the server refuses. There is no query language to learn. Refinement is an ordinary computed property, and filtering happens client-side without a round trip. See [Data queries](https://www.wildflowerjs.com/docs/data-query). ```javascript wildflower.query('products', { from: '/api/products', key: 'id', refresh: ['focus', 'fresh:30'], // re-check on focus, at most every 30s to: '/api/products/:id', // where write() sends changes body: item => item // what to send }); ``` #### AI-Friendly by Construction LLMs like Claude, Gemini, and GPT are excellent at HTML, CSS, and JavaScript because those make up most of their training corpus. Framework-specific syntax is a thinner slice. WildflowerJS code is what AI generates cleanly without translation, and what humans can debug without sourcemaps. #### TypeScript Where It Counts Type-safe state, computed properties, and stores ship with the framework. Your existing TS skills transfer directly. The runtime `types` validator catches binding-shape drift in dev. Template-level type-checking for `data-bind` expressions is on the roadmap. ## Standards Compliance Web developers once treated validation as part of the job, and markup that failed the W3C validator was markup with bugs in it. Most front-end tools have since left that behind. Alpine's `x-data` and `@click`, Vue's `v-if` and `:class`, and htmx's `hx-get` are attributes the HTML standard does not define; browsers tolerate them, and the validator reports each one as an error. The standard gives authors one way to add their own attributes, `data-*`, and WildflowerJS reads nothing else. Its markup is valid HTML as written, with nothing to configure. Alpine and htmx can switch to `data-` names, Alpine through `Alpine.prefix()`, which turns off its `@` and `:` shorthands, but that is an option you choose, and their documentation is written in the other form. ## Zero Install. Zero Attack Surface. Every dependency you install lets a maintainer you have never met run scripts on your dev machine and in your CI. A typical React + Vite + UI-lib setup pulls in **300+ transitive packages** before you write a feature. Each one is a potential intrusion vector. [NPM worms](https://thehackernews.com/2026/04/self-propagating-supply-chain-worm.html), [OAuth chains compromising deploy platforms](https://www.trendmicro.com/en_us/research/26/d/vercel-breach-oauth-supply-chain.html), [postinstall hijacking](https://cloud.google.com/blog/topics/threat-intelligence/supply-chain-node-js): the supply chain is now where production code gets compromised, not the deploy. A WildflowerJS project has none of that surface. There is no `npm install`, postinstall script, or transitive package graph. The framework is one file you copy or pin by hash. ## Performance Without Compromise WildflowerJS writes to the DOM directly, which keeps both bulk list operations and single-value updates fast. ##### Direct DOM Updates No virtual DOM diffing overhead. State changes go straight to the elements that need updating, and no other node is touched. ##### Small Footprint The full framework ships as a single bundle that includes stores, routing, and SSR. No additional state management library required. ## Where WildflowerJS Shines WildflowerJS is built for reactive web development at any scale. It suits prototypes and production, solo builders and large teams. Some scenarios it's particularly well-suited to: #### Project Types - Customer-facing SaaS, internal tools, dashboards - Embedded widgets and interactive components - Documentation sites with live examples - Anywhere bundle size and load time matter #### Team Priorities - Shipping product over configuring tooling - Supply-chain risk treated as a real concern - AI-assisted code generation that runs as written - Skills that transfer when frameworks change Lite Boids Flocking 800+ autonomous agents at native frame rate. Every boid is a DOM element, drawn without canvas or WebGL. [Demo](https://www.wildflowerjs.com/demos/boids/) [Code](https://www.wildflowerjs.com/demos/view-source.html?file=boids/app.js) Core Kanban Board Drag-and-drop, modals, animated transitions, search filtering, and localStorage persistence. [Demo](https://www.wildflowerjs.com/demos/kanban-wf/) [Code](https://www.wildflowerjs.com/demos/view-source.html?file=kanban-wf/app.js) ## The Philosophy #### Trust the Platform Browsers have billions of hours of optimization behind them. The DOM isn't slow; inefficient abstractions are. We work with browser APIs, not against them. #### Separation of Concerns HTML describes structure. CSS describes presentation. JavaScript describes behavior. They work together but stay separate, so you can restyle a page without touching its behavior and change its behavior without touching the markup. #### Progressive Enhancement Your HTML works without JavaScript. The framework enhances it. If the script fails to load, the markup already in the document still renders. #### No Magic When you read WildflowerJS code, you understand what it does. No transpiler or build step sits between the file you edit and the code the browser runs. ## How Updates Work When state changes in WildflowerJS, updates flow directly to the DOM: **State Changes** this.count++ → **Proxy Marks Dependents** the bindings that read count → **DOM Updated** Element.textContent = 1 There's no intermediate representation, tree diffing, or reconciliation phase. The framework updates the one element that displays `count` directly. The marked bindings are flushed on a microtask rather than one at a time, so several writes in the same block produce a single DOM pass, before the browser paints. ### Element-Level Precision Each binding tracks its own dependencies. When `count` changes: - Only elements bound to `count` update - Other bindings don't re-evaluate - No parent components re-render - No children are touched This granularity comes from the **dependency graph**. Each `data-bind`, `data-show`, or `data-list` is its own effect that knows exactly what it depends on and which DOM element it controls. ## State Without Ceremony State in WildflowerJS is just a JavaScript object. No special wrappers or access patterns to memorize. ```javascript // Define state state: { count: 0, user: { name: 'Alice', score: 100 } } // Update state by assigning this.count++ this.user.name = 'Bob' this.user = { name: 'Charlie', score: 200 } // All of these trigger reactive updates automatically ``` Nested properties, array mutations, and complete replacements all work the same way: each one updates the bindings that read the changed value. ## Ready to Try It? The quickest way to start is with a single script tag: ```html
Hello, World!
Hello, World!