Simple Icons¶
Simple Icons is a library of over 3,000 icons for popular brands.
Usage¶
- Find the icon you want
- Pass its name to
icons.simple
(1)
-
icons.si
works, too.
There's just one unintuitive exception
The icon, identified by Simple Icons as "/e/", is passed as simply "e"
.
Icon names are case-inensitive.
Props¶
Name | Type | Description | |
---|---|---|---|
title |
str |
A short, accessible, title for the icon. | |
color |
str | tuple |
The color of the icon. May be a hex code, a tuple of RGB, RGBA, or HSL values, or any valid CSS Color Module Level 3 color name. It may also be "default" , in which case the icon will use the color it has been assigned by Simple Icons. |
|
size |
int | str |
The size of the icon. May be an integer (in pixels) or a CSS size string (e.g., "1rem" ). |
|
version |
int | "latest" |
The major version of Simple Icons to use for this icon. May be "latest" or an integer greater than or equal to 10. Defaults to the value of the simple.version setting. |
Version switching¶
Simple Icons periodically removes icons for various reasons — for example, if their associated entity rebrands
or ceases operations. To prevent icon removals from breaking your project, the version
prop allows you to choose
which major version of Simple Icons a particular icon should use. RIL supports everything
back to Simple Icons 10.
For example, to use the Twitter icon that was removed in Simple Icons 12:
Or to use icons for Microsoft brands, which were removed in Simple Icons 13:
Removed icons aren't on the website
Simple Icons doesn't list removed icons on its website, so you won't be able to search for them, know their names, or see what they look like before using them in your project.
Global version switching¶
The simple.version
setting allows you to globally set a major version of Simple Icons that will be used for all icons
in your project
that do not explicitly set the version
prop.
simple.version
: Controls the major version of Simple Icons used by RIL.
simple.version
is the highest major version of Simple Icons that RIL may use (or latest
). RIL
will use the newest version of Simple Icons available within this constraint.
If this is an integer, it must be greater than or equal to 10. Defaults to latest
.