Skip to content
On this page
On this page

Octicon renders an Octicon with System arguments. Octicon can also be rendered with the primer_octicon helper, which accepts the same arguments.

Arguments

NameTypeDefaultDescription
icon_nameSymbol, StringnilName of Octicon to use.
iconSymbol, StringnilName of Octicon to use.
sizeSymbol:smallOne of :small (16) and :medium (24).
use_symbolBooleanfalseEXPERIMENTAL (May change or be removed) - Set to true when using with OcticonSymbols.
system_argumentsHashN/ASystem arguments

Examples

Default

<%= render(Primer::OcticonComponent.new(:check)) %>
<%= render(Primer::OcticonComponent.new(icon: :check)) %>

Medium

<%= render(Primer::OcticonComponent.new(:people, size: :medium)) %>

Helper

<%= primer_octicon(:check) %>