View Source BootstrapIconComponents

Package Documentation CI

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 project. Version numbers in this project track those from Bootstrap Icons.

installation

Installation

The package can be installed by adding bootstrap_icon_components to your list of dependencies in mix.exs:

def deps do
  [
    {:bootstrap_icon_components, "~> 1.9.1"}
  ]
end

usage

Usage

defmodule MyApp.Icons do
  use Phoenix.Component
  use BootstrapIconComponents, include: ["1_circle", "cpu"]
end

Then call the components in your HEEX templates:

<.MyApp.Icons.bs_1_circle class="w-4" />

See the docs for details.