Docs
Pick where to start. If you are new, go from the top. If you are looking for something, go straight to attributes, properties or functions.
Installation
How to load it with one script tag and how to import it as a module. Where to put the script.
A small app
Build a counter, a dropdown, and a tag search, one after another. By the end you will have used almost all of the core.
Attributes 22
From
h-scope to h-pre. What you write on elements.
Properties 12
$scope · $el · $emit … Names you use inside expressions.
Functions 2
start() and plugin(). What you call from a script.
Extensions
Form validation $v, the turbo-frame handle $tf, and writing a plugin.
Three things to know first
- A scope is a boundary. The inside of
h-scopedoes not see the outer scope's values on its own. Write what it receives withh-inheritorh-inject. - Received values are read-only. You cannot assign to
$propsor to a name received withh-inject. To change one, ask the providing side with$emit. - Only
h-scopeand components are mounted when inserted later. A fragment the server sends later comes with its ownh-scope.