Avatars are images used to represent users and organizations on GitHub.
Use the default round avatar for users, and the square
argument
for organizations or any other non-human avatars.
Examples Default<%= render ( Primer : : AvatarComponent . new ( src : "http://placekitten.com/200/200" , alt : "@kittenuser" ) ) %>
Square<%= render ( Primer : : AvatarComponent . new ( src : "http://placekitten.com/200/200" , alt : "@kittenuser" , square : true ) ) %>
Link<%= render ( Primer : : AvatarComponent . new ( href : "#" , src : "http://placekitten.com/200/200" , alt : "@kittenuser" ) ) %>
ArgumentsName Type Default Description src
String
N/A The source url of the avatar image. alt
String
N/A Passed through to alt on img tag. size
Integer
20
Adds the avatar-small class if less than 24. square
Boolean
false
Used to create a square avatar. href
String
nil
The URL to link to. If used, component will be wrapped by an <a>
tag. system_arguments
Hash
N/A System arguments