https://github.com/timetask/boxicons-heex
https://github.com/timetask/boxicons-heex
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/timetask/boxicons-heex
- Owner: timetask
- Created: 2021-12-09T20:17:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-24T04:15:38.000Z (over 3 years ago)
- Last Synced: 2025-12-02T02:32:48.160Z (7 months ago)
- Language: Elixir
- Size: 3.64 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Boxicon
Boxicons Heex is [Phoenix](https://github.com/phoenixframework/phoenix) component library that wraps the amazing [Boxicons](https://boxicons.com) library.
[](https://hex.pm/packages/boxicons_heex) [](https://github.com/timetask/boxicons-heex/actions/workflows/build.yml)
## Usage
```elixir
defmodule MyComponent do
@impl true
def render(assigns) do
~H"""
"""
end
end
```
## Configuration
### Default values
Default values let you write your boxicons using less code.
```elixir
config :boxicons_heex,
default_type: "regular",
default_size: 24,
default_class: "icon"
```
### Icons
By default Boxicon will compile all the 1500+ icons, which can take a while and will make you runtime
unnecessarily bloated. To fix this, you can specify the icons you want or an entire category.
This are some possible configurations:
Two regular icons, all the logos and none of the solid ones.
```elixir
config :boxicons_heex,
icons: [
regular: ["calendar", "chvron-down"],
logos: :all,
solid: nil
]
```
Just the icons you need (recommended)
```elixir
config :boxicons_heex,
icons: [
regular: ["calendar", "chvron-down"],
solid: ["hand", "file-md"],
logos: ["docker"]
]
```
Compile all the icons (default config)
```elixir
config :boxicons_heex,
icons: :all
```
For the complete list of available icons visit the [boxicons wesite](https://boxicons.com).
## Installation
Add boxicons to your dependencies in your `mix.exs` file
```elixir
def deps do
[
{:boxicons_heex, "~> 1.0.0"}
]
end
```
Then run
```
mix deps.get
```
and that's pretty much it.