Lucide Icons for Go (Golang) #2744
Replies: 3 comments 1 reply
-
|
See below for newest info
golucide html a-arrow-downgolucide html a-arrow-down -out templates/icons
golucide templ a-arrow-downgolucide templ a-arrow-down -out templates/icons
// where tpls is your existing html templates
err := htmlicons.AddLucideIcons(tpls)
// handle err
err = tpls.ExecuteTemplate(w, "a-arrow-down", nil) // or to add attributes use []template.HTMLAttr{} instead of nil
<html>
<body>
<!--without data-->
{{ template "a-arrow-down" }}
<!--with data-->
{{ template "a-arrow-down" . }}
</body>
</html>
templicons.AArrowDown() // or to add attributes use templ.Attributes as an argument
```~~ |
Beta Was this translation helpful? Give feedback.
-
|
Cool project! |
Beta Was this translation helpful? Give feedback.
-
|
This one has now been retired in favour of a slightly more refined version which aggregates icons from a number of popular icon libraries. Does the exact same as above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT
This project now supports both Templ templates and html/template from the Go stdlib.
It can be used as either a command line tool to drop only the components you need or imported as a dependency.
I've created a repo for Go users to use these icons in their projects.
The icons are simply wrapped in a Templ template and the class attribute has been exposed so that the icon can be styled via css classes.If you're not using Templ to build your project, you can still use this repo. Templ will remain a dependency, but you can use it to convert it to raw HTML to be injected into html/template templates.See here for said repo: go-templ-lucide.See here for said repo: go-lucide-icons.
Beta Was this translation helpful? Give feedback.
All reactions