Interpolation
Last updated
Last updated
Replaces placeholder variables in a string template with actual values. It allows you to create dynamic text by inserting variable content into a predefined template.
template
The string template with placeholders like {name}
String
Yes
(dynamic)
Values to insert into the template
Any
No
value
The final string with replaced values
String
Drag the Interpolation node into your graph.
Connect your template string with placeholders in curly braces like "color.{base}.500" to the "template" input. Here the placeholder is "base".
Add custom inputs by right-clicking the node and adding inputs with names matching your placeholders.
Connect values to each named input to replace the corresponding placeholders. Like "red".
The output of the node is "color.red.500", the placeholder "base" is replaced by the named input "red".
Input names must exactly match the placeholder names in your template (without the curly braces).
Placeholders that don't have a matching input will remain unchanged in the output.
Message Generation: Create personalized messages by injecting names or other dynamic content.
URL Construction: Build dynamic URLs by inserting variable parameters into a template.
Naming Patterns: Generate consistent naming patterns for design tokens with variable components.
: For combining multiple strings into one without using a template.
: For simpler find-and-replace text operations.