Run a component
Follow Getting started to check out the framework and open its hello demo. You can also run the hosted hello demo before installing anything.
In your local checkout, replace crates/demos/demos/hello.wisp with this smaller component:
<p>Hello, vapors.</p> Close the demo window, then rebuild and run it:
cargo run -p vapors-app --example demo -- hello The window should show “Hello, vapors.” Change that text, close the window and run the command again to see your edit.
A component can be just a template
The template is required; the script and stylesheet are optional. The file name gives the generated component its name: hello.wisp becomes Hello.
A script section contains Rust statements that run when the component mounts. A style section contains CSS. Both appear before the template, and each can appear at most once. The next lesson adds state and a click handler.
Does this component need an empty script section?
No. A non-empty template is enough.
Check syntax separately
When you only want to check parsing and code generation:
cargo run -p vapors-compiler --bin wisp-check -- crates/demos/demos/hello.wisp A successful exit does not open a window or check the generated Rust types. Running the demo compiles the generated Rust and exercises the document’s layout and styling too.