Are you an LLM? You can read better optimized documentation at /directives.md for this page in Markdown format
Directive Overview
This page provides a quick overview for all built-in directives available in Lune.
| Directive | Syntax | Description |
|---|---|---|
| lu-scope | lu-scope="{ count: 0 }" | Marks an element as a component and defines its scope. |
| lu-if | lu-if="ok", lu-else-if, lu-else | Conditionally render elements. |
| lu-show | lu-show="ok" | Toggles visibility using CSS display. |
| lu-for | lu-for="item in items" | Iterate over arrays or objects. |
| lu-model | lu-model="msg" | Two-way data binding on form inputs. |
| lu-on | @click="doThis", lu-on:submit.prevent | Attach event listeners. |
| lu-bind | :src="imageSrc", lu-bind:class | Reactive attribute binding. |
| lu-effect | lu-effect="console.log(count)" | Run reactive side effects. |
| lu-text | lu-text="msg" | Update element text content. |
| lu-html | lu-html="rawHtml" | Update element innerHTML. |
| lu-cloak | lu-cloak | Hides uncompiled templates until ready. |
| lu-pre | lu-pre | Skip compilation for this element. |
| lu-once | lu-once | Render once and skip future updates. |
| ref | ref="myDiv" | Register a reference to an element. |