All Projects → avmaisak → ngx-bootstrap-icons

avmaisak / ngx-bootstrap-icons

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

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to ngx-bootstrap-icons

Tabler Icons
A set of over 1400 free MIT-licensed high-quality SVG icons for you to use in your web projects.
Stars: ✭ 10,858 (+41661.54%)
Mutual labels:  icons, iconset, icons-pack, bootstrap-icons
Coreui Icons
CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
Stars: ✭ 1,813 (+6873.08%)
Mutual labels:  icons, iconset, icons-pack
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (+280.77%)
Mutual labels:  components, angular-library
foundational-design-system-proto
A prototype for a foundational design system at Shopify
Stars: ✭ 82 (+215.38%)
Mutual labels:  components, icons
Bootstrap Vue
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Stars: ✭ 13,603 (+52219.23%)
Mutual labels:  components, icons
Icongenie
CLI tool to generate all the icons and splashscreens for your Quasar Apps
Stars: ✭ 174 (+569.23%)
Mutual labels:  icons, iconset
Awesome Iconjar
44 Collect free icon sets for iconjar. 收集免费的图标包,iconjar 格式(44套)。
Stars: ✭ 188 (+623.08%)
Mutual labels:  icons, iconset
Rmdi
React Material Design Icons – built with Pixo, Styled Components, and Styled System
Stars: ✭ 132 (+407.69%)
Mutual labels:  components, icons
Smart Hierarchy
Better hierarchy for Unity.
Stars: ✭ 234 (+800%)
Mutual labels:  components, icons
custom-brand-icons
Custom brand icons for Home Assistant
Stars: ✭ 242 (+830.77%)
Mutual labels:  iconset, icons-pack
svelte-simple-icons
📦 This package provides the Simple Icons packaged as a set of Svelte components.
Stars: ✭ 27 (+3.85%)
Mutual labels:  components, icons
Simple Line Icons
Simple and Minimal Line Icons
Stars: ✭ 1,815 (+6880.77%)
Mutual labels:  icons, icons-pack
minimal-icons
Minimal Icons
Stars: ✭ 21 (-19.23%)
Mutual labels:  icons, iconset
Ionicons
Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎
Stars: ✭ 15,802 (+60676.92%)
Mutual labels:  icons, iconset
Simple Icons
SVG icons for popular brands
Stars: ✭ 12,090 (+46400%)
Mutual labels:  icons, iconset
Pixo
Convert SVG icons into React components
Stars: ✭ 371 (+1326.92%)
Mutual labels:  components, icons
Hass Bha Icons
Additional icons for Home Assistant to accompany the MDI icons
Stars: ✭ 75 (+188.46%)
Mutual labels:  icons, iconset
Coolicons
Carefully designed icons for your next project. Perfect for use in web and mobile. Support for SVG, your favourite design tool and webfont. Completely free and open source.
Stars: ✭ 81 (+211.54%)
Mutual labels:  icons, iconset
React Kawaii
Cute SVG React Components
Stars: ✭ 2,709 (+10319.23%)
Mutual labels:  components, icons
majesticons
A versatile, beautiful, and scalable iconset. 760 icons each in line and solid style.
Stars: ✭ 98 (+276.92%)
Mutual labels:  icons, iconset

Bootstrap logo

ngx-bootstrap-icons

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 Bootstrap logo

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].