Packages
Macro for generating Phoenix components for Bootstrap icons. Only include the icons you need to avoid slow compilation and bloated modules.
Current section
Files
Jump to
Current section
Files
bootstrap_icon_components
README.md
README.md
# BootstrapIconComponents
[](https://hex.pm/packages/bootstrap_icon_components) [](https://hexdocs.pm/bootstrap_icon_components) 
Macro for generating Phoenix components for Bootstrap icons. Only include the icons you need to avoid slow compilation and bloated modules.
Icons are from the [Bootstrap Icons](https://github.com/twbs/icons) project. Version numbers in this project track those from Bootstrap Icons.
## Installation
The package can be installed by adding `bootstrap_icon_components` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:bootstrap_icon_components, "~> 1.9.1"}
]
end
```
## Usage
```elixir
defmodule MyApp.Icons do
use Phoenix.Component
use BootstrapIconComponents, include: ["1_circle", "cpu"]
end
```
Then call the components in your HEEX templates:
```html
<.MyApp.Icons.bs_1_circle class="w-4" />
```
See [the docs](https://hexdocs.pm/bootstrap_icon_components) for details.