/blazor-bootstrap-icons

Blazor component for Bootstrap Icons

Primary LanguageHTMLMIT LicenseMIT

Blazor Bootstrap Icons

Use the Bootstrap Icons library as Blazor components. This solution is inspired by React Bootstrap Icons.

Installation

dotnet add package Blazor.Bootstrap.Icons

Nuget

Usage

@using Blazor.Bootstrap.Icons.Components

<BiArrowRight />

To make icons available globally in your project, you can add @using Blazor.Bootstrap.Icons.Components to your _Imports.razor file.

The icon names are the PascalCase version of the original name. To avoid conflicts with any other components in your project, all component names start with the prefix Bi.

Parameters

Attribute Default value
Class "bi bi-" + icon name (e.g. bi-arrow-right)
Color "currentColor"\
Size "1em"

You can add any other attribute like title, it will be attached to the SVG element.

More options

Other ways to use Bootstrap Icons: https://icons.getbootstrap.com/#usage

License

  • Blazor Bootstrap Icons are open-sourced (MIT)
  • react-bootstrap-icons are open-sourced (MIT)
  • Bootstrap Icons are open-sourced (MIT)