Icons and Images
Last updated
Last updated
KVision has built-in support for free font icons from the project (you have to include kvision-fontawesome
module) and from the project (with kvision-bootstrap-icons
module). 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. KVision supports all free Font Awesome style prefixes - Solid (fas
), Regular (far
) and Brands (fab
). You can check icon availability at .
The dedicated io.kvision.html.Icon
component lets you use those icons inside any container.
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/jsMain/resources/modules/img
directory and refer to them with a @JsModule
annotation.
To use an external image just use its URL address:
The dedicated io.kvision.html.Image
component lets you use images inside any container. It gives you also some additional control over image align, shape and responsiveness: