Partials
Modular HTML components for blocks.
Partials are reusable HTML snippets you can include in your blocks. Changes you make to a partial update in all of the blocks it's included in.
<a class="btn" href="{{url}}">
{{label}}
</a>
Use variables in your partials where you want dynamic values.
Passing data
Partials can accept text data or variables from the sidebar.
<!-- Static values are passed in quotes -->
{{> Button label="Click Me" url="http://www.example.com"}}
<!-- Variables from the sidebar are name only -->
{{> Button label=button-label url=button-link}}
<!-- In a loop access variables the same way -->
{{#each buttons}}
{{> Button label=button-label url=button-link}}
{{/each}}
Tips
It's tempting to use partials for everything once you get a taste. They are very powerful.
There is a price to pay for going too modular though. The AI is not able to make changes to your partials. The trick to a healthy partials library is finding the pieces that are truly stable and consistent. Buttons, badges and cards are all good candidates for partials.