Skip to content

timetask/boxicons-heex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boxicon

Boxicons Heex is Phoenix component library that wraps the amazing Boxicons library.

Hex pm build

Usage

defmodule MyComponent do

  @impl true
  def render(assigns) do
    ~H"""
      <Box.icons
        type="regular"
        name="calendar"  
        size="64" 
        class="icon green"
      />
    """
  end
end

Configuration

Default values

Default values let you write your boxicons using less code.

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.

config :boxicons_heex,
  icons: [
    regular: ["calendar", "chvron-down"],
    logos: :all,
    solid: nil
  ]

Just the icons you need (recommended)

config :boxicons_heex,
  icons: [
    regular: ["calendar", "chvron-down"],
    solid: ["hand", "file-md"],
    logos: ["docker"]
  ]

Compile all the icons (default config)

config :boxicons_heex,
  icons: :all

For the complete list of available icons visit the boxicons wesite.

Installation

Add boxicons to your dependencies in your mix.exs file

def deps do
  [
    {:boxicons_heex, "~> 1.0.0"}
  ]
end

Then run

mix deps.get

and that's pretty much it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages