| Crates.io | octicons-pack |
| lib.rs | octicons-pack |
| version | 19.18.0 |
| created_at | 2025-09-01 12:05:50.500979+00 |
| updated_at | 2025-09-15 11:49:36.354806+00 |
| description | A redistribution of @primer/octicons npm package's SVG and metadata. |
| homepage | |
| repository | https://github.com/2bndy5/redist-icons |
| max_upload_size | |
| id | 1819476 |
| size | 535,111 |
A redistribution of SVG assets and some metadata from the
@primer/octicons npm package.
The SVG data is embedded as strings after it is optimized with SVGO. This
package is intended to easily inject SVG data into HTML documents. Thus, we have
stripped any width and height fields from the <svg> element, while
retaining any viewBox field in the <svg> element.
All icons are instantiated as constants using the Icon data structure.
There is a convenient get_icon() function to fetch an icon using it's slug name.
Note, most icons have *_16 or *_24 variants to indicate the
original height and width.
from octicons_pack import get_icon, GIT_BRANCH_24
fetched = get_icon("git-branch-24")
assert fetched is not None
assert GIT_BRANCH_24.svg == fetched.svg
use octicons_pack::{get_icon, GIT_BRANCH_24};
assert_eq!(GIT_BRANCH_24.svg, get_icon("git-branch-24").unwrap().svg);