Skip to content

Layout

Use Layout to build a main/sidebar layout.

Examples

Default

<%= render(Primer::LayoutComponent.new) do |component| %>
<% component.with(:sidebar) { "Sidebar" } %>
<% component.with(:main) { "Main" } %>
<% end %>
<%= render(Primer::LayoutComponent.new(side: :left)) do |component| %>
<% component.with(:sidebar) { "Sidebar" } %>
<% component.with(:main) { "Main" } %>
<% end %>

Arguments

NameTypeDefaultDescription
responsiveBooleanfalseWhether to collapse layout to a single column at smaller widths.
sideSymbol:rightWhich side to display the sidebar on. One of :right and :left.
sidebar_colInteger3Sidebar column width.
system_argumentsHashN/ASystem arguments