Icons and images
Icons
KVision has built-in support for font icons distributed with Bootstrap version 3 (glyphicons) and Font Awesome version 4. Components like buttons, links, drop-downs, select options and tabs have an icon
property, which can be set to one of many available icon names. To use a glyphicon from Bootstrap just use the name of the selected icon (e.g. "asterisk"). To use Font Awesome icon use the name with "fa-" prefix (e.g. "fa-asterisk"). Some examples:
The dedicated pl.treksoft.kvision.html.Icon
component lets you use those icons inside any container.
Images
Components like buttons, links, tabs and the css background class have an image
property, which can be used to display custom images. To use your own graphical resources, put them inside the src/main/resources/img
directory and refer to them with a require
function:
Note: All local files referenced in your application will be processed by Webpack and saved under a mangled name in the output directory.
To use an external image just use its URL address without require
.
The dedicated pl.treksoft.kvision.html.Image
component lets you use images inside any container. It gives you also some additional control over image align, shape and responsiveness:
Last updated