Skip to content

FlexItem

Deprecated

Use FlexItem to specify the ability of a flex item to alter its dimensions to fill available space

Deprecation

Use Box instead.

Before:

<%= render Primer::FlexItemComponent.new(flex_auto: :auto) %>

After:

<%= render Primer::BoxComponent.new(flex: :auto) %>

Arguments

NameTypeDefaultDescription
flex_autoBooleanfalseFills available space and auto-sizes based on the content. Defaults to false
system_argumentsHashN/ASystem arguments

Examples

Default

Item 1
Item 2
<%= render(Primer::FlexComponent.new) do %>
<%= render(Primer::FlexItemComponent.new) do %>
Item 1
<% end %>
<%= render(Primer::FlexItemComponent.new(flex_auto: true)) do %>
Item 2
<% end %>
<% end %>