Skip to main content

Template Syntax

Widget templates use a JSX-like syntax that gets compiled server-side into JSON structures for rendering.

Basic Syntax

Self-Closing Tags

Nested Components

Data Binding

Simple Values

Template Literals

Expressions

Conditional Rendering

Logical AND

Ternary Operator

Lists and Iteration

Basic Map

Complex List Items

With Index

Prop Types

Strings

Numbers

Booleans

Objects

Best Practices

  1. Always use keys in lists
  1. Keep expressions simple
  1. Use meaningful prop names
  1. Proper nesting