Repository navigation
fasthtml-lucide — typed Lucide icons for FastHTML #941
SpaceShaman
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! I’d like to share fasthtml-lucide, a small library for using Lucide SVG icons in FastHTML.
Installation
Using uv:
Or pip:
Usage
Iconrenders an inline SVG and accepts a kebab-case icon name, CSS classes, and an optional size:The SVG files are bundled in the Python package, so your application doesn’t need Node.js, client-side JavaScript, or a CDN. Icons inherit their color through
currentColor.Typed icon names
The package generates an
IconNametype containing every available icon name. This provides editor autocomplete and lets type checkers catch misspelled names.You can also use the type in your own components:
Icons are decorative (
aria-hidden="true"), so icon-only buttons should have an accessible label on the button itself.Automatic updates
A daily workflow checks for new
lucide-staticreleases on npm and automatically builds, tests, and publishes updates to PyPI.The PyPI version matches the bundled npm version. Python-only fixes use a
.postNsuffix, such as1.61.0.post1, while keeping the same Lucide icons.Links
Feedback and suggestions are welcome!
All reactions