As we go through the various UI elements later, we're going to sprinkle a few icons throughout, just to give the page a bit more visual interest. Icons can come from two icon libraries, located at fontawesome.io/icons/
and getbootstrap.com/components/#glyphicons
. They can be added simply using the icon()
command with the name of the required icon given as a string.
For example, icon("user")
will by default return icons from the fontawesome library, and to use the glyphicons, simply add lib = "glyphicon"
as follows:
icon = icon("user", lib = "glyphicon")
They can be added directly to your UI or on buttons (including the buttons at the top of tab panels). From the full code of this application, you can see that we have replaced the boring horizontal rule, which separated our input widgets with a spinning Linux penguin (because, woo! Linux!) using class = "fa-spin"
. The class
argument comes from the use of CSS classes to vary the characteristics of Font Awesome icons. The...