Skip to content

Octicon

Table of contents
Table of contents

Octicon renders an Octicon with System arguments. Octicon can also be rendered with the primer_octicon helper, which accepts the same 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) %>

Arguments

NameTypeDefaultDescription
iconSymbolnilName 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