Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsmestad/boxicons_elixir
Use Boxicons inside HEEx and Phoenix Components
https://github.com/jsmestad/boxicons_elixir
boxicons elixir icons liveview phoenix
Last synced: 10 days ago
JSON representation
Use Boxicons inside HEEx and Phoenix Components
- Host: GitHub
- URL: https://github.com/jsmestad/boxicons_elixir
- Owner: jsmestad
- License: other
- Created: 2022-09-22T15:55:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T18:03:32.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T18:41:11.285Z (7 months ago)
- Topics: boxicons, elixir, icons, liveview, phoenix
- Language: Elixir
- Homepage: https://hex.pm/packages/boxicons
- Size: 358 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Boxicons
[Boxicons](https://boxicons.com) are "simple open source icons carefully crafted for designers & developers". This package gives you Elixir functions to drop Boxicons into your HTML, styled with arbitrary classes.
This library provides optimized svgs for regular and solid Boxicons packaged as a Phoenix Component.
## Installation
The package can be installed by adding `boxicons` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:boxicons, "~> 0.1.0"}
]
end
```After that run `mix deps.get`
## Usage
The components are provided by the `Boxicons` module. Each icon is a Phoenix Component you can use in your HEEx templates.
For icons with both a `regular` and `solid` variant, the regular style is used:
```eex
```
You can select the solid variant by passing a flag:
```eex
```
You can also provide arbitrary HTML attributes to the svg tag, such as classes:
```eex
```
For a full list of icons see [the docs](https://hexdocs.pm/boxicons/api-reference.html) or [boxicons.com](https://boxicons.com/).
## Credits
This project is inspired by the [heroicons_elixir](https://github.com/mveytsman/heroicons_elixir) library.