
jcr-contents.jcrexplorer.fontawesome.docs.index.html Maven / Gradle / Ivy
Font Awesome, the iconic font designed for use with Twitter Bootstrap
Font Awesome
The iconic font designed for use with Twitter Bootstrap
Desktop Font + Vectors
The full desktop font and a pdf of vectors are now included. Happy designing.
70 New Icons in v2.0
All requested by our active community on the Font Awesome GitHub project.
IE7 Support
Font Awesome v2.0 now even supports IE7. If you need it, you have my condolences.
One font, 220 icons
In a single collection, Font Awesome is a pictographic language of web-related actions.
Free for commercial use
The Font Awesome webfont and CSS libraries are completely free for commercial use.
Screen reader compatible
Font Awesome won't trip up screen readers, unlike most icon fonts.
Made for Twitter Bootstrap
Designed from scratch to be fully backwards compatible with Twitter Bootstrap 2.0.
CSS control
Easily style icon color, size, shadow, and anything that's possible with CSS.
Infinite scalability
Scalable vector graphics means icons look awesome at any size.
New Icons in 2.0
You asked, Font Awesome delivers with 70 shiny new icons in version 2.0. This giant set of new icons was requested on the Font Awesome GitHub project and includes icon parity with Bootstrap 2.0.3.
All Icons by Category
Web Application Icons
Text Editor Icons
Directional Icons
Video Player Icons
Social Icons
Examples
Many examples re-used from the Twitter Bootstrap documentation.
Integration
It's easy to integrate Font Awesome into Twitter Bootstrap, or even use it on its own.
Bootstrap using LESS
Use this method if integrating with Twitter Bootstrap using LESS
- Copy the Font Awesome font directory into your project.
- Copy font-awesome.less into your bootstrap/less directory.
- Open bootstrap.less and replace
@import "sprites.less";
with @import "font-awesome.less";
-
Open your project's font-awesome.less and edit the font url to ensure it points to the right place.
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot');
src: url('../font/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
url('../font/fontawesome-webfont.woff') format('woff'),
url('../font/fontawesome-webfont.ttf') format('truetype'),
url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
font-weight: normal;
font-style: normal;
}
- Re-compile your LESS if using a static compiler. Otherwise, you should be good to go.
- Check out the examples to start using Font Awesome!
Bootstrap using CSS
Use this method if integrating with Twitter Bootstrap using CSS.
- Customize Twitter Bootstrap here. Make sure to uncheck the default "Icons" under "Base CSS."
- Copy the Font Awesome font directory into your project.
- Copy font-awesome.css into your project.
- Open your project's font-awesome.css and edit the font url to ensure it points to the right place (see above example).
-
In the
<head>
of your html, reference the location to your font-awesome.css.
<link rel="stylesheet" href="../css/bootstrap.css">
<link rel="stylesheet" href="../css/font-awesome.css">
- Check out the examples to start using Font Awesome!
Not using Bootstrap?
Font Awesome works just as well without Twitter Bootstrap.
- Copy the Font Awesome font directory into your project.
- Copy font-awesome.less or font-awesome.css into your project.
- Open your project's font-awesome.less or font-awesome.css and edit the font url to ensure it points to the right place (see above example).
- Check out the examples to start using Font Awesome!
Code
Inline Icon
Place Font Awesome icons just about anywhere with the <i>
tag.
icon-camera-retro
<div style="font-size: 24px;">
<i class="icon-camera-retro"></i> icon-camera-retro
</div>
Icon classes are echoed via CSS :before.
Increase the icon size by using the icon-large
class. This increases the size by 33% relative to the font-size of the container.
icon-camera-retro
<div style="font-size: 24px;">
<i class="icon-camera-retro icon-large"></i> icon-camera-retro
</div>
Font Awesome icons work great in buttons.
<a class="btn" href="#">
<i class="icon-refresh"></i> Refresh</a>
<a class="btn btn-success" href="#">
<i class="icon-shopping-cart icon-large"></i> Checkout</a>
<a class="btn btn-large btn-primary" href="#">
<i class="icon-comment"></i> Comment</a>
<a class="btn btn-danger" href="#">
<i class="icon-trash icon-large"></i> Delete</a>
<a class="btn btn-small" href="#">
<i class="icon-cog"></i> Settings</a>
<a class="btn btn-small btn-info" href="#">
<i class="icon-info-sign"></i> More Info</a>
<div class="btn-group">
<a class="btn" href="#"><i class="icon-align-left"></i></a>
<a class="btn" href="#"><i class="icon-align-center"></i></a>
<a class="btn" href="#"><i class="icon-align-right"></i></a>
<a class="btn" href="#"><i class="icon-align-justify"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-primary" href="#"><i class="icon-user"></i> User</a>
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-pencil"></i> Edit</a></li>
<li><a href="#"><i class="icon-trash"></i> Delete</a></li>
<li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li>
<li class="divider"></li>
<li><a href="#"><i class="i"></i> Make admin</a></li>
</ul>
</div>
Don't forget to add the appropriate JavaScript to enable button dropdowns.
Lists
- Lists
- Buttons
- Button groups
- Navigation
- Prepended form inputs
Easily replace individual bullets.
<ul class="icons">
<li><i class="icon-ok"></i> Lists</li>
<li><i class="icon-ok"></i> Buttons</li>
<li><i class="icon-ok"></i> Button groups</li>
<li><i class="icon-ok"></i> Navigation</li>
<li><i class="icon-ok"></i> Prepended form inputs</li>
</ul>
Navigation
Use Font Awesome icons in navigation to provide helpful visual cues.
<ul class="nav nav-list">
<li class="active"><a href="#"><i class="icon-home"></i> Home</a></li>
<li><a href="#"><i class="icon-book"></i> Library</a></li>
<li><a href="#"><i class="icon-pencil"></i> Applications</a></li>
<li><a href="#"><i class="icon-cogs"></i> Settings</a></li>
</ul>
Prepended form inputs
<form>
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span>
<input class="span2" type="text" placeholder="Email address">
</div>
<div class="input-prepend">
<span class="add-on"><i class="icon-key"></i></span>
<input class="span2" type="password" placeholder="Password">
</div>
</form>
Custom CSS
Anything you can do with CSS font effects, you can do with Font Awesome.
Star Ratings (inspired by CSS Tricks)
Roadmap
Here's the plan for future updates.
- Font sub-setting. Keep your font file sizes small by only using the icons you need.
- Better hinting for smaller font sizes.
- More icons. Have any requests? Open an issue in the Font Awesome GitHub project.
- More complete Twitter Bootstrap compatibility.
- Tricks and tips for super-awesome creative CSS methods, like the star example above.