Tutorial
Learn
The book: seventeen chapters, read in order. The first three are a tour that ends with a working site and an app; the rest teach the language, then how to build with it.
The tour
1. Getting started
Install the compiler, make a project, run it, change it and see the change — then set up your editor, or WebFluent Studio, and see what a build writes.
2. Tutorial: Shelf
Build a small, complete site — data, components, a store, a form, a theme, a test — and put it on the web.
3. Tutorial: Todos
Build a todo list kept in the reader's browser — types, a store that remembers, a component, a filter in the address and tests that click.
The language
4. Language basics
The shape of every .wf file: the fifteen kinds of declaration, naming, comments, the two kinds of body, the two layouts and how strings are written.
5. Pages and routing
A page is a route and what it shows. Each page names its own path, the app shell frames every page, and a layout frames a section.
6. Elements
Everything on screen is an element, and every element is written the same way: a name, one positional value, named props, flags and a block.
7. State and reactivity
A state is a signal, and only what reads it updates: no tree re-renders, no subscriptions to manage.
8. Events
Handlers on elements, keyboard shortcuts, the events components fire, the overlays a page opens, and drag and drop.
9. Control flow
Five statements decide what a page shows: if, if let, for, show and match. Each adds and removes elements as its condition changes.
10. Components
A component is a reusable element you declare: typed props, events, slots, parts and a body, checked like a built-in.
11. Stores
A store is state shared by every page and component that uses it, built the first time something reads it.
12. Types
A strict, structural type checker that changes no output and names every mistake where you wrote it.
Building with it
13. Styling
Restyle the whole site with a theme, one element with a style block, and many elements with your own stylesheet — and make the layout responsive.
14. Forms and validation
Bind controls to state, validate what the reader types, upload files, and show what the server said.
15. Fetching data
Get data onto a page: show a request's cases, ask from an action, describe a service once, and read files at build time.
16. Testing
Tests written in WebFluent: render a component and read what it shows, or click through it in a real browser — then check every page in one.
17. PDF and slides
Compile the same language to a paginated PDF document or a slide deck — invoices, reports and talks, laid out with CSS as on the web.