ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - avmaisak/ngx-bootstrap-icons: This Angular module allows you to use the Bootstrap Icons in your angular application without additional dependencies.
This Angular module allows you to use the Bootstrap Icons in your angular application without additional dependencies. - avmaisak/ngx-bootstrap-icons
Visit Site

GitHub - avmaisak/ngx-bootstrap-icons: This Angular module allows you to use the Bootstrap Icons in your angular application without additional dependencies.

GitHub - avmaisak/ngx-bootstrap-icons: This Angular module allows you to use the Bootstrap Icons in your angular application without additional dependencies.

This Angular module allows you to use the Bootstrap Icons in your angular application without additional dependencies.

GitHub issues GitHub license GitHub stars npm version Package Quality

npm i ngx-bootstrap-icons --save

Bootstrap Icons full set

Demo

Demo Here

Usage

1. Install the package

npm i ngx-bootstrap-icons --save

2. Import module

import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons';

3. Import assets

You can import all icons (not recomended) or each icon individually.

3.1 Import all icons
import { allIcons } from 'ngx-bootstrap-icons';
3.2 Import some icons
import { alarm, alarmFill, alignBottom } from 'ngx-bootstrap-icons';
// Select some icons (use an object, not an array)
const icons = {
  alarm,
  alarmFill,
  alignBottom
};

4. Import Module (all icons)

import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgxBootstrapIconsModule.pick(allIcons)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

4.1. Import Module (some icons)
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons';
import { alarm, alarmFill, alignBottom } from 'ngx-bootstrap-icons';

// Select some icons (use an object, not an array)
const icons = {
  alarm,
  alarmFill,
  alignBottom
};

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgxBootstrapIconsModule.pick(icons)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

/**

Another way.
--------------

Import NgxBootstrapIconsModule.pick(icons) inside of the AppModule

Import NgxBootstrapIconsModule (without the pick() method) inside of any FeatureModule where will be used.

Now you can import icons in one place only (root module) and successfully use the component anywhere you want.

**/

4.2. Configure Module (optional)
import { NgxBootstrapIconsModule, ColorTheme } from 'ngx-bootstrap-icons';
import { alarm, alarmFill, alignBottom } from 'ngx-bootstrap-icons';

// Select some icons (use an object, not an array)
const icons = {
  alarm,
  alarmFill,
  alignBottom
};

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgxBootstrapIconsModule.pick(icons, { 
        width: '2em', 
        height: '2em', 
        theme: ColorTheme.Danger,
    })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Configure options
Name of input prarameter Type Required Default Value Description
width string false null icon default width
height string false null icon default height
theme enum false null default color theme

5. Use it in template

<i-bs name="alarm-fill"></i-bs>

or (with your preffered tag)

<i i-bs name="alarm-fill"></i>

or optionally use our enums for autocomplete support

import { iconNamesEnum } from 'ngx-bootstrap-icons';

public iconNames = iconNamesEnum;

<i-bs [name]="iconNames.AlarmFill"></i-bs>

Also you can use width and height for icon (By default width and height are 1rem)

<i-bs 
  name="alarm-fill" 
  width="2rem" 
  height="2rem">
</i-bs>
<i
  i-bs 
  name="alarm-fill" 
  width="2rem" 
  height="2rem">
</i>

6. Input parameters

Name of input prarameter Type Required Default Value Description
name string true null name of the icon
width string false null width of the icon. Default value used from svg
height string false null height of the icon. Default value used from svg
resetDefaultDimensions boolean false false if this parameter is set, default dimensions of the svg icon will be removed

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory