Accessing Data in Templates
Display collection items in your component templates
Syntax
@each(item in collections.features)
<div>{{item.title}}</div>
@endeachBasic Example
<ul class="features-list">
@each(feature in collections.features)
<li>
<h3>{{feature.title}}</h3>
<p>{{feature.description}}</p>
</li>
@endeach
</ul>Real-World Examples
Audio Playlist Tracks
Feature Cards with Icons
Pricing Tiers
Team Members
Using Loop Variables
Variable
Description
Example with Loop Variables
First/Last Styling
Handling Empty Collections
Accessing Nested Properties
Best Practices
Related
Last updated
Was this helpful?

