Adding repeated elements
Plasmic’s designs are static, but in your real site you may want dynamically repeating sets of elements. These usually repeat according to some data or state. For instance, you want to show a list of blog posts or products.
First, we recommend ensuring that the children you want to repeat are already extracted as their own component.
For instance, if you have a
Homepage component/page containing a list of blog posts, extract this as a
(This naturally tends to be the case, and these components naturally tend to have slots for the parts that vary—for instance the BlogPost might have a
excerpt slot so that the Plasmic static design can show a set of BlogPosts that have different text.)
Homepage put these into an element named
blogPosts, then you can override the element’s
children prop with the dynamic set of
BlogPosts you want:
Homepage had a slot for the blog posts (called
blogPosts), then you can simply pass that into the slot rather than overriding an element’s