Skip to content

BorderBox

Table of contents
Table of contents

BorderBox is a Box component with a border.

Examples

Header
Body
  • Row one
  • Row two
<%= render(Primer::BorderBoxComponent.new) do |component| %>
<% component.header do %>
Header
<% end %>
<% component.body do %>
Body
<% end %>
<% component.row do %>
<% if true %>
Row one
<% end %>
<% end %>
<% component.row do %>
Row two
<% end %>
<% component.footer do %>
Footer
<% end %>
<% end %>

Padding density

Header
Body
  • Row two
<%= render(Primer::BorderBoxComponent.new(padding: :condensed)) do |component| %>
<% component.header do %>
Header
<% end %>
<% component.body do %>
Body
<% end %>
<% component.row do %>
Row two
<% end %>
<% component.footer do %>
Footer
<% end %>
<% end %>

Arguments

NameTypeDefaultDescription
paddingSymbol:defaultOne of :default, :condensed, or :spacious.
system_argumentsHashN/ASystem arguments

Slots

Optional Header.

NameTypeDefaultDescription
system_argumentsHashN/ASystem arguments

Body

Optional Body.

NameTypeDefaultDescription
system_argumentsHashN/ASystem arguments

Optional Footer.

NameTypeDefaultDescription
system_argumentsHashN/ASystem arguments

Rows

Use Rows to add rows with borders and maintain the same padding.

NameTypeDefaultDescription
system_argumentsHashN/ASystem arguments