DocsFirst pages · FQL
On this page

Make your page reactive

Bind an input and display its value with FQL.

A Frontbacked theme is the reusable website package you ship: pages, styles, scripts, assets, optional skins, and optional rules for the data and actions the site supports.

Frontbacked Query Language (FQL) is the frontend language built into frontbacked.js. It lets that theme declare browser state, read URL/query/site values, load Frontbacked data, and render values into the DOM without writing a custom data layer for every page.

With FQL, plain HTML can become a signed-in dashboard, a marketplace listing page, an upload form, a site settings editor, a wallet-powered checkout, or an adaptive video experience while the theme stays easy to read and ship.

FQL appears in three places:

  1. A {STATE} comment inside <head>.
  2. The state option passed to Frontbacked.init().
  3. f-* attributes on HTML elements.

When both are present, Frontbacked.init({ state }) is used first. The {STATE} comment is the fallback when no state is passed to init.

Minimal Page

index.html

When the user types into #name, FQL updates $state.name, recomputes $state.displayName, and renders the new value into the h1.

Continue with Build your first form.