Interactivity
Interactivity Two Ways
Taxus provides two options to make your static site interactive. Use them independently or together.
| Layer | Technology | Best For |
|---|---|---|
| General | static/scripts.js | DOM manipulation, toggles, analytics |
| Performance | Yew WASM islands | Complex state, heavy computation |
Plain 'ol JavaScript
Taxus outputs an empty scripts.js for you to fill as you see fit. Use it for simple interactivity across your site.
WebAssembly with Yew
This feature is experimental, but with the power of Yew you can create widgets that tap into WebAssembly performance. Pages render immediately with pre-rendered HTML—WASM hydrates components asynchronously.
Here's a counter widget to demonstrate:
Documentation
For complete islands reference, see the Islands Architecture documentation.