Use Menu
to create vertical lists of navigational links.
Name | Type | Default | Description |
---|---|---|---|
system_arguments | Hash | N/A | System arguments |
heading
Optional menu heading
Name | Type | Default | Description |
---|---|---|---|
tag | Symbol | N/A | One of :h1 , :h2 , :h3 , :h4 , :h5 , or :h6 . |
system_arguments | Hash | N/A | System arguments |
items
Required list of navigational links
Name | Type | Default | Description |
---|---|---|---|
href | String | N/A | URL to be used for the Link |
selected | Boolean | N/A | Whether the item is the current selection |
system_arguments | Hash | N/A | System arguments |
<%= render(Primer::Alpha::Menu.new) do |component| %><% component.with_heading(tag: :h2) do %>Heading<% end %><% component.with_item(selected: true, href: "#url") do %>Item 1<% end %><% component.with_item(href: "#url") do %><%= render(Primer::Beta::Octicon.new("check")) %>With Icon<% end %><% component.with_item(href: "#url") do %><%= render(Primer::Beta::Octicon.new("check")) %>With Icon and Counter<%= render(Primer::Beta::Counter.new(count: 25)) %><% end %><% end %>