Directory

← Back

FontAwesomeLabel

Add the latest FontAwesome icons to your applications with modifiers like stack, spin, and flip.

Author

Rating

Popularity

<100

Font Awesome Icons for Vaadin

Do you want the newer Font Awesome icons not currently packaged in Vaadin? This addon includes a replacement FontAwesome enum with the latest icons, and enhances their native functionality.

The enum works just like the existing implementation, so setIcon() works as you would expect. Also included is a getLabel() method, which returns a label component with all of the CSS classes that Font Awesome provides. This component allows you to add multiple modifiers to your icons in a one-liner fashion by chaining methods such as stack(), spin(), setSize2x(), setBorder(), etc.

This addon is currently packaged with FontAwesome 4.7.0. To use it add the JAR file to your classpath. It may be necessary to re-compile your theme. If you're having trouble using this addon, please see the Troubleshooting section of the readme in GitHub.

The code written for this addon (FontAwesome, FontAwesomeLabel and HTML scraper) is licensed under the Apache 2.0 license. Font Awesome is licensed under the MIT and SIL OFL 1.1 licenses. See fontawesome.io/license for more information.

Vaadin 7 users must use version 1.3.4. Vaadin 7 compatibility will no longer be maintained.

Sample code

import com.kbdunn.vaadin.addons.fontawesome.FontAwesome;

// 3x Large Spinning Cog!
content.addComponent(FontAwesome.COG.getLabel().setSize3x().spin());

// Stack icons
content.addComponent(FontAwesome.TWITTER.getLabel().stack(FontAwesome.SQUARE_O).setSize3x());

// Stack icons with separate modifiers
content.addComponent(FontAwesome.HDD_O.getLabel().stack(FontAwesome.EXCLAMATION.getLabel().inverseColor()).setSize3x().reverseStackSize());

// Set the icon of another Vaadin component
button.setIcon(FontAwesome.SMILE_O);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • Upgrade to FontAwesome 4.2.0
Released
2014-09-20
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Vaadin 7.1+ in 1.1.4
Vaadin 8.0+ in 1.4.0
Browser
Browser Independent

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online