https://answerdotai.github.io/fa6-icons/
fontawesome 6 free icons as SVGs
https://answerdotai.github.io/fa6-icons/
Last synced: about 2 months ago
JSON representation
fontawesome 6 free icons as SVGs
- Host: GitHub
- URL: https://answerdotai.github.io/fa6-icons/
- Owner: AnswerDotAI
- License: apache-2.0
- Created: 2024-08-24T23:58:01.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-22T01:04:12.000Z (4 months ago)
- Last Synced: 2025-02-22T19:42:33.422Z (about 2 months ago)
- Language: Python
- Homepage: https://AnswerDotAI.github.io/fa6-icons
- Size: 989 KB
- Stars: 9
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fasthtml - Fontawesome 6 Free Icons as SVGs
- awesome-fasthtml - Fontawesome 6 Free Icons as SVGs
README
# fa6-icons
This module provides the free icons from [Font
Awesome](https://fontawesome.com/) v6 in a python-friendly form.The actual SVGs and associated data are licensed on the same terms as
the originals – this package only adds a little on top to make them
easier to use from Python.## Install
``` sh
pip install fa6_icons
```…or…
``` sh
conda install -c fastai fa6_icons
```## How to use
Two objects are provided, `svgs` and `dims`.
``` python
from fa6_icons import svgs,dims
```These are both [AttrDict](https://fastcore.fast.ai/basics.html#attrdict)
objects, which behave as dicts, but can also be accessed with
dotted-attrs. They contain the same keys. To search them, use standard
python dict approaches, e.g:``` python
[o for o in svgs if 'addr' in o]
```['address_book', 'address_card']
Each style is available as a key for each SVG and dims entry, e.g:
``` python
dims.address_card
`````` json
{'regular': (512, 576), 'solid': (512, 576)}
```In a notebook environment, SVGs are displayed:
``` python
svgs.address_card.regular
```To make attr access more convenient, hyphens are replaced with
underscores, and icon names starting with a digit are prefixed with an
underscore.Use `width` to view the svg in a notebook with a different width (it
defaults to 300px).``` python
svgs._9.solid.width(25)
```When stringified, the SVG text is returned:
``` python
print(svgs._9.solid)
```