Skip to content

Examples

Seven reference components, each shipped with byte-verbatim output across all six targets (Vue, React, Svelte, Angular, Solid, Lit). Pick whichever lines up with the feature you're trying to evaluate.

By complexity

  • Counter<props> with model: true, <data>, $computed, template event handlers. The smallest example that's still interesting.
  • SearchInput.debounce(300) modifier, $emit, $onMount with a teardown return, r-if / r-else, $refs. Single-component scope with rich event-handling.
  • Modal<listeners> block with side-effect handlers (body-scroll lock, focus), .self modifier on a backdrop click, multiple colocated lifecycle hooks, slots with scoped params, <components> embed. The heaviest single-file example.
  • Dropdown.outside(...$refs), .throttle(100).passive, reactive when predicates, named slot with scoped params. The marquee <listeners> showcase.
  • TreeNode — self-recursion via <components> self-import; minimal <props>-only component. Demonstrates the per-target self-reference idioms.
  • Card (with CardHeader) — wrapper-pair composition. Two .rozie files; shows the kebab/camel prop bridge and the per-target child-component import + selector rewrite (notably Angular's <rozie-card-header>).
  • TodoListr-for with :key, multiple $emit channels, named + default slots with per-item scoped params, fallback content, r-if / r-else empty state. Calls out the documented React render-prop divergence in slot consumer ergonomics.

By feature

If you're looking for a specific authoring feature:

FeatureSee
model: true two-way bindingCounter, Modal, Dropdown, TodoList
$computedCounter, SearchInput, TodoList
$emitSearchInput, Modal, TodoList
$refs in scriptSearchInput, Modal, Dropdown
$onMount with teardown returnSearchInput, Modal
$onMount / $onUnmount colocated pairModal
Multiple $onMount hooksModal, Dropdown
<listeners> block with reactive whenModal, Dropdown
.debounce(ms) modifierSearchInput
.throttle(ms).passive modifier chainDropdown
.outside(...$refs) modifierDropdown
.self modifierModal
.enter / .escape key filtersSearchInput
<components> blockModal, Card, TreeNode
Self-recursionTreeNode
r-for with :keyTodoList, TreeNode
r-if / r-elseSearchInput, TodoList
r-modelSearchInput, TodoList
Named slotsModal, Dropdown, TodoList
Default slot with scoped paramsModal, Dropdown, TodoList
Slot fallback contentTodoList
:root { } global escape hatch in <style>Modal, Dropdown

For the design rationale behind each of these, see Features & design choices.

Pre-v1.0 — internal monorepo.