Skip to content

ButtonMarketing

Use buttons for actions (e.g. in forms). Use links for destinations, or moving from one page to another.

Examples

Button types

<%= render(Primer::ButtonMarketingComponent.new(mr: 2)) { "Default" } %>
<%= render(Primer::ButtonMarketingComponent.new(button_type: :primary, mr: 2)) { "Primary" } %>
<%= render(Primer::ButtonMarketingComponent.new(button_type: :outline)) { "Outline" } %>
<div class="bg-gray-dark">
<%= render(Primer::ButtonMarketingComponent.new(button_type: :transparent)) { "Transparent" } %>
</div>

Sizes

<%= render(Primer::ButtonMarketingComponent.new(mr: 2)) { "Default" } %>
<%= render(Primer::ButtonMarketingComponent.new(variant: :large)) { "Large" } %>

Arguments

NameTypeDefaultDescription
button_typeSymbol:defaultOne of :default, :primary, :outline, or :transparent.
variantSymbol:defaultOne of :default and :large.
tagSymbol:buttonOne of :button and :a.
typeSymbol:buttonOne of :button and :submit.
system_argumentsHashN/ASystem arguments