ListComponent
import Example from ‘../../src/@primer/gatsby-theme-doctocat/components/example’
List
is used to show a list of items in a vertical format.
Arguments
Name | Type | Default | Description |
---|---|---|---|
classes |
String |
"" |
Classes and attributes |
attributes |
Hash |
{} |
Classes and attributes |
Slots
Items
Examples
Basic
<% numbers = [1, 2, 3] %>
<%= render(Ariadne::ListComponent.new) do |list| %>
<% numbers.each do |number| %>
<%= list.item do |item| %>
<%= number %>
<% end %>
<% end %>
<% end %>
Have questions?
Still have questions? Talk to support.