Learn how to use template variables and preview props in your document templates
Template variables allow you to create dynamic documents by passing data to your templates. This guide shows you how to define and use template variables in your JSX templates.
Create a template component that accepts props for dynamic content:
Define preview data for development and testing using PreviewProps
:
You can use nested objects and arrays for more complex templates:
You can use JavaScript expressions and functions in your preview props:
Learn how to use template variables and preview props in your document templates
Template variables allow you to create dynamic documents by passing data to your templates. This guide shows you how to define and use template variables in your JSX templates.
Create a template component that accepts props for dynamic content:
Define preview data for development and testing using PreviewProps
:
You can use nested objects and arrays for more complex templates:
You can use JavaScript expressions and functions in your preview props: