Directives
Directives are Regor’s runtime template control surface.
By default, directive names start with r-. You can customize the prefix with RegorConfig.
Core Rules
Section titled “Core Rules”r-directives are explicit full-form syntax.:is shorthand forr-bind.@is shorthand forr-on..shorthand binds DOM properties (equivalent tor-bind.prop).
Binding
Section titled “Binding”r-text: text content binding.r-html: HTML content binding.r-bind: attributes/properties/object binding.r-model: form two-way binding.r-on: event binding.r-show: conditional visibility.:class: dynamic class binding.:style: dynamic style binding.
Control Flow
Section titled “Control Flow”Component and Utility
Section titled “Component and Utility”:is: dynamic component selection.:context: component prop object binding.:ref: element/component references.r-pre: skip compilation for subtree.r-teleport: move DOM subtree to another target.
Important Keying Note
Section titled “Important Keying Note”In r-for, both key="row.id" and :key="row.id" are expression bindings in Regor templates. Both are supported. Nested paths like a.b.c.d are supported.
Use stable keys whenever list identity matters.
Recommendation
Section titled “Recommendation”Read in this order: