We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Integrates Bootstrap Icons seamlessly into your Phoenix application with Tailwind CSS support. This feature provides access to over 1,800+ Bootstrap Icons through a custom Tailwind plugin, allowing you to use icons as CSS classes without additional JavaScript dependencies.
Key Benefits
icon/1
component to support Bootstrap Icons out of the boxImplementation Details
The feature adds the twbs/icons
dependency as a sparse checkout to minimize repository size, then configures a custom Tailwind plugin that reads SVG files and generates CSS classes. Icons are prefixed with bi-
to distinguish them from other icon sets. The implementation extends Phoenix's core components to handle Bootstrap Icons through the existing icon/1
function.
Usage Example
# In your templates or components
<.icon name="bi-house" class="w-5 h-5 text-blue-500" />
<.icon name="bi-envelope-fill" class="w-4 h-4" />
# Or use directly as Tailwind classes
<span class="bi-gear w-6 h-6" />
Configuration
After installation, Bootstrap Icons work immediately with your existing Phoenix components. The Tailwind plugin automatically discovers all available icons from the dependency and generates corresponding CSS classes during your asset build process.