kvision / pl.treksoft.kvision.html

Package pl.treksoft.kvision.html

Components supporting complete set of HTML tags, with dedicated classes for buttons, images, links, lists and iframe. Support for Handlebars.js templates is included.

Types

(js)

Align

CSS align attributes.

enum class Align
(js)

Bold

Simple component rendered as b.

open class Bold : Tag
(js)

Button

Button component.

open class Button : SimplePanel
(js)

ButtonSize

Button sizes.

enum class ButtonSize
(js)

ButtonStyle

Button styles.

enum class ButtonStyle
(js)

ButtonType

Button types.

enum class ButtonType
(js)

Canvas

Canvas component.

open class Canvas : Widget
(js)

CustomTag

HTML custom tag component.

open class CustomTag : Tag
(js)

Div

Simple component rendered as div.

open class Div : Tag
(js)

Fieldset

Simple component rendered as fieldset.

open class Fieldset : Tag
(js)

Footer

Simple component rendered as footer.

open class Footer : Tag
(js)

H1

Simple component rendered as h1.

open class H1 : Tag
(js)

H2

Simple component rendered as h2.

open class H2 : Tag
(js)

H3

Simple component rendered as h3.

open class H3 : Tag
(js)

H4

Simple component rendered as h4.

open class H4 : Tag
(js)

H5

Simple component rendered as h5.

open class H5 : Tag
(js)

H6

Simple component rendered as h6.

open class H6 : Tag
(js)

Header

Simple component rendered as header.

open class Header : Tag
(js)

Icon

Icon component with support for FontAwesome and Bootstrap glyphicons.

open class Icon : Tag
(js)

Iframe

Iframe component.

open class Iframe : Widget
(js)

Image

Image component.

open class Image : Widget
(js)

ImageShape

Image shapes.

enum class ImageShape
(js)

Label

Simple component rendered as label.

open class Label : Tag
(js)

Li

Simple component rendered as li.

open class Li : Tag
(js)

Link

Link component.

open class Link : SimplePanel
(js)

ListTag

HTML list component.

open class ListTag : SimplePanel
(js)

ListType

HTML list types.

enum class ListType
(js)

Main

Simple component rendered as main.

open class Main : Tag
(js)

Nav

Simple component rendered as nav.

open class Nav : Tag
(js)

Ol

Simple component rendered as ol.

open class Ol : ListTag
(js)

P

Simple component rendered as p.

open class P : Tag
(js)

Sandbox

Iframe sandbox options.

enum class Sandbox
(js)

Section

Simple component rendered as section.

open class Section : Tag
(js)

Span

Simple component rendered as span.

open class Span : Tag
(js)

TAG

HTML tags.

enum class TAG
(js)

Tag

HTML tag component.

open class Tag : SimplePanel, Template
(js)

Template

Handlebars templates helper interface.

interface Template
(js)

TextNode

Simple component for rendering text DOM node.

open class TextNode : Widget
(js)

Ul

Simple component rendered as ul.

open class Ul : ListTag

Functions

(js)

bold

DSL builder extension function.

fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Bold.() -> Unit)? = null): Bold
(js)

button

DSL builder extension function.

fun Container.button(text: String, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, type: ButtonType = ButtonType.BUTTON, disabled: Boolean = false, separator: String? = null, labelFirst: Boolean = true, classes: Set<String>? = null, className: String? = null, init: (Button.() -> Unit)? = null): Button
(js)

canvas

DSL builder extension function.

fun Container.canvas(canvasWidth: Int? = null, canvasHeight: Int? = null, classes: Set<String>? = null, className: String? = null, init: (Canvas.() -> Unit)? = null): Canvas
(js)

customTag

DSL builder extension function.

fun Container.customTag(elementName: String, content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, attributes: Map<String, String> = mapOf(), init: (CustomTag.() -> Unit)? = null): CustomTag
(js)

div

DSL builder extension function.

fun Container.div(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Div.() -> Unit)? = null): Div
(js)

fieldset

DSL builder extension function.

fun Container.fieldset(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Fieldset.() -> Unit)? = null): Fieldset
(js)

footer

DSL builder extension function.

fun Container.footer(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Footer.() -> Unit)? = null): Footer
(js)

h1

DSL builder extension function.

fun Container.h1(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H1.() -> Unit)? = null): H1
(js)

h2

DSL builder extension function.

fun Container.h2(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H2.() -> Unit)? = null): H2
(js)

h3

DSL builder extension function.

fun Container.h3(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H3.() -> Unit)? = null): H3
(js)

h4

DSL builder extension function.

fun Container.h4(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H4.() -> Unit)? = null): H4
(js)

h5

DSL builder extension function.

fun Container.h5(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H5.() -> Unit)? = null): H5
(js)

h6

DSL builder extension function.

fun Container.h6(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (H6.() -> Unit)? = null): H6
(js)

header

DSL builder extension function.

fun Container.header(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Header.() -> Unit)? = null): Header
(js)

icon

DSL builder extension function.

fun Container.icon(icon: String, init: (Icon.() -> Unit)? = null): Icon
(js)

iframe

DSL builder extension function.

fun Container.iframe(src: String? = null, srcdoc: String? = null, name: String? = null, iframeWidth: Int? = null, iframeHeight: Int? = null, sandbox: Set<Sandbox>? = null, classes: Set<String>? = null, className: String? = null, init: (Iframe.() -> Unit)? = null): Iframe
(js)

image

DSL builder extension function.

fun Container.image(src: ResString?, alt: String? = null, responsive: Boolean = false, shape: ImageShape? = null, centered: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (Image.() -> Unit)? = null): Image
(js)

label

DSL builder extension function.

fun Container.label(content: String? = null, rich: Boolean = false, forId: String? = null, classes: Set<String>? = null, className: String? = null, init: (Label.() -> Unit)? = null): Label
(js)

li

DSL builder extension function.

fun Container.li(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Li.() -> Unit)? = null): Li
(js)

link

DSL builder extension function.

fun Container.link(label: String, url: String? = null, icon: String? = null, image: ResString? = null, separator: String? = null, labelFirst: Boolean = true, classes: Set<String>? = null, className: String? = null, init: (Link.() -> Unit)? = null): Link
(js)

listTag

DSL builder extension function.

fun Container.listTag(type: ListType, elements: List<String>? = null, rich: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (ListTag.() -> Unit)? = null): ListTag
(js)

main

DSL builder extension function.

fun Container.main(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Main.() -> Unit)? = null): Main
(js)

nav

DSL builder extension function.

fun Container.nav(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Nav.() -> Unit)? = null): Nav
(js)

ol

DSL builder extension function.

fun Container.ol(elements: List<String>? = null, rich: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (Ol.() -> Unit)? = null): Ol
(js)

p

DSL builder extension function.

fun Container.p(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (P.() -> Unit)? = null): P
(js)

section

DSL builder extension function.

fun Container.section(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Section.() -> Unit)? = null): Section
(js)

setData

Extension function to set serializable object as a template data.

fun <K> Template.setData(obj: K, serializer: SerializationStrategy<K>): Unit
fun <K : Any> Template.setData(obj: K): Unit
(js)

span

DSL builder extension function.

fun Container.span(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Span.() -> Unit)? = null): Span
(js)

tag

DSL builder extension function.

fun Container.tag(type: TAG, content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, attributes: Map<String, String> = mapOf(), init: (Tag.() -> Unit)? = null): Tag
(js)

textNode

DSL builder extension function.

fun Container.textNode(content: String, rich: Boolean = false, init: (TextNode.() -> Unit)? = null): TextNode
(js)

ul

DSL builder extension function.

fun Container.ul(elements: List<String>? = null, rich: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (Ul.() -> Unit)? = null): Ul