Icons

Kilua has built-in support for free font icons from the Font Awesome project (you have to include kilua-fontawesome module) and from the Bootstrap Icons project (with kilua-bootstrap-icons module). Composable functions for buttons, links, drop-downs, tabs and accordion have an icon parameter, which can be set to one of many available icon names. Kilua supports all free Font Awesome style prefixes - Solid (fas), Regular (far) and Brands (fab). You can check icon availability at Font Awesome gallery page.

button("A button with an icon", "fas fa-asterisk")
a("https://google.com", "A link with an icon", "fab fa-google")

There is also a dedicated atom()composable function, which can be used to just render an icon with some optional text label.

atom("Some label with an icon", "fas fa-plus", separator = " ", iconFirst = false)

Last updated