Icon

Icons at GitHub are called Octicons, which are available in various implementations including React, Figma, Rails, and Styled System.

  • @primer/react@36.5.0
  • Alpha
  • Not reviewed for accessibility

Import

import {Octicon} from '@primer/react'

Examples

View in Storybook

Props

Octicon

NameDefaultDescription
ariaLabel
string

Specifies the aria-label attribute, which is read verbatim by screen readers

icon
Component

Checks the input by default in uncontrolled modeName of the Octicon component used in the

color
string

Sets an override color for the Octicon. Compatible with colors from the Primer color system."

size
16number

Sets the uniform width and height of the SVG element

verticalAlign
text-bottomstring

Sets the vertical-align CSS property

sx
SystemStyleObject