1. Using Velt If component
Wrap wireframe components and HTML elements in Velt If. If the condition is false, nothing inside renders. Good for targeting a group of elements at once.
- React / Next.js
- Other Frameworks
2. Using Velt If attribute
Add the attribute to an existing wireframe component. Good for targeting a single component.
- React / Next.js
- Other Frameworks
Syntax
A condition is a string evaluated as a JavaScript expression:{annotation.comments.length}, {annotation.comments[0].from.userId}). See Template Variables for every available name and which roots allow nested access.
Anything outside this list is stripped before evaluation.
Examples
- React / Next.js
- Other Frameworks
Strict CSP Policy
Some environments enforce a Content Security Policy that disallowsunsafe-eval, which blocks the default evaluator. Switch to Velt’s CSP-compliant parser:
- React / Next.js
- Other Frameworks
Related
- Display a value instead of hiding a block: Template Variables.
- Apply a CSS class on the same kind of condition: Conditional Classes.

