JBStrap icons

Icons

The JBStrap framework uses Font Awesome 4.7.0 based icons. The usable icons can be found in the Icon enum. The icons are not components, so they cannot be directly displayed on the user interface. Most of the components provided by the framework support the use of these icons. These icons only have to be specified as values in the components and they will be displayed.

However, if you want to display just the icon, you can, but you must use a container component, such as any text based one, or the HTMLFlow component.

Displaying an icon in the beginning of a paragraph:
Displaying an icon by itself, using the HTMLFlow component:
Using an icon on a button component:

You can also search for icons by name in the Icon enum. With this solution, you can store the icons of elements in a database. For example, you can save the icon of a menu item, or if you want to let the user select an icon for some data that they created.

Searching for an icon by its name:

This search is case insensitive. If you are looking for the Gear icon, capitalization doesn’t influence the search.

Related pages: