An ember-cli addon for using Font Awesome icons in Ember applications.
In your application's directory:
$ ember install ember-cli-font-awesome
If you have manually installed or updated the addon via NPM then you should also run:
$ ember generate ember-cli-font-awesome
Version >= 1.0.0
of this addon is compatible with Ember >= 1.11.X
and
requires Ember CLI >= 1.13.X
.
Version >= 0.1.0 < 1.0.0
of this addon is compatible with Ember >= 1.13.X
and requires Ember CLI >= 1.13.X
If you need compatibility with Ember < 1.11.X
then you should try version
0.0.9
You can opt-in to the scss version of font-awesome. You can do this by adding
the following configuration in ember-cli-build.js
:
var app = new EmberApp({
emberCliFontAwesome: {
useScss: true
}
});
Then in your app.scss
:
@import "bower_components/font-awesome/scss/font-awesome";
In your Handlebars templates:
This will render:
<i class="fa fa-camera"></i>
If you prefer, you can use the fa-
prefix in the icon name.
Complete list of Font Awesome icons
The Font Awesome examples
illustrate the various options and their effects. It should be obvious how these
options map to their fa-icon
counterparts.
In combination with the {{fa-list}}
and {{fa-list-icon}}
components:
aria-hidden attribute
To better support accessibility (i.e. screen readers), the helper now generates an aria-hidden
attribute by default:
To remove the aria-hidden
attribute:
You can respond to actions on the icon by passing on action handlers:
Use tagName
to control the generated markup: