Use octicons to symbolize metaphors and actions common to GitHub. When using octicons keep the following principles in mind:
For most components, icon color has been set using our functional color variables.
Some use cases allow for icons to be paired with a specific color based on the intended function. Use the table below as a reference.
Example | Color variable | Usage |
---|---|---|
icon-info | Used to indicate important information | |
icon-success | Used to indicate a successful, passing, or positive result | |
icon-danger | Used to indicate an error, danger, or negative result | |
icon-warning | Used to indicate warning |
Octicons are primarily available in two sizes: 16px and 24px. They should only be used at their dedicated sizes to maintain consistency in stroke width and legibility.
A limited set of 12px icons are available for specific usage within condensed UI and are listed below.
Icon | Name | Usage |
---|---|---|
alert-fill | For cautionary messaging or to inform the user that an action requires attention | |
check-circle-fill | For positive messaging to inform the user that an action is successful, complete, or that they may continue through a workflow | |
no-entry-fill | Indicate an ending or that the user is blocked and cannot continue | |
x-circle-fill | For negative messaging to inform the user that an error has occurred as a result of an action or an action is unavailable |
Scaling icons from their original size is not permitted.
Certain octicons are intended for a specific use case. Refer to the table below for icons with specific guidelines.
Icon | Metaphor | Usage |
---|---|---|
Commits | The commit icon is represented as a circle on a line. This symbolizes a point (the circle) along the version history timeline when changes were made. Use this icon in views to represent individual or groups of commits, including the timeline and the Commits tab in pull requests | |
Issues | The issue icon is represented as a circle with an • which is to represent an item to be done. A closed issue is conisdered "done" and is represented with a checkmark inside of the circle, and by combining the sync icon with an • for reopening an issue. A draft issue is represented with. adashed line around the • symbol. These four symbols should be used exclusively with issues | |
Pull requests | The pull request icon is represented as a commit dot attached with an arrow being inserted into the history timeline (two dots connected by a line) | |
Repos | A repository in GitHub is represented as a closed book and is explicitly named as repo . Octicons does contain a book icon which displays an open book symbol that is used for wikis, READMEs, and other use cases where the user can see a collection of information |
GitHub mark
Brand logo use only. Follow GitHub's brand guidelines when using this octicon.
By default, all octicons use an outline style. Some icons have a filled version which should be used only under the following conditions:
Use a filled icon to aid in contrast when in relation to another icon
Use a filled icon to indicate navigation state in GitHub's native mobile apps
The state of an action can be displayed either by using a stroke and fill icon pairing or using a slash version of an icon if available.
Use the outline icon for the "off"/"empty" state and the fill icons for "on"/"filled" states.
Metaphor | Icon pairing |
---|---|
Sponsor/Sponsoring | / |
Star/Unstar | / |
Pass/Fail | / |
The exception to this rule is when conveying a "pass"/"fail" pairing which is done using the filled version of the check-circle
and x-circle
Use outline and fill pairings to show the state of an action
Use outline and fill pairings to indicate the status or completion of an action (for example, an action running)
Specific icons have a stateful pair using a slash to indicate the "off/empty" state. Use these when indicating that an action is removing or disabling a function.
Metaphor | Icon pairing |
---|---|
Subscribe/Unsubscribe | / |
Save/Unsave | / |
Watch/Unwatch | / |
The save and subscribe action buttons in notifications are special cases where a slash version of the icon is used for the "off"/"empty" state.