Package-level declarations

KVision core classes. This includes base interfaces for all components, CSS enums (for colors, borders, backgrounds, fonts, text and position) and the main Widget class.

Types

Link copied to clipboard

CSS flexbox/grid content alignment options.

Link copied to clipboard

CSS flexbox/grid items alignments options.

Link copied to clipboard
class AttributeDelegate(attributeName: String)
Link copied to clipboard
Link copied to clipboard
class Background(color: Color? = null, image: ResString? = null, positionX: <Error class: unknown class><Number, UNIT>? = null, positionY: <Error class: unknown class><Number, UNIT>? = null, sizeX: <Error class: unknown class><Number, UNIT>? = null, sizeY: <Error class: unknown class><Number, UNIT>? = null, size: BgSize? = null, repeat: BgRepeat? = null, origin: BgOrigin? = null, clip: BgClip? = null, attachment: BgAttach? = null)

Type-safe definition of CSS background.

Link copied to clipboard

Definitions of CSS background attachment options.

Link copied to clipboard
enum BgClip : Enum<BgClip>

Definitions of CSS background clipping options.

Link copied to clipboard

Definitions of CSS background origin options.

Link copied to clipboard

Definitions of CSS background repeat options.

Link copied to clipboard
enum BgSize : Enum<BgSize>

Definitions of CSS background size.

Link copied to clipboard
class Border(width: <Error class: unknown class><Number, UNIT>? = null, style: BorderStyle? = null, color: Color? = null)

Type-safe definition of CSS border.

Link copied to clipboard

Definitions of CSS border styles.

Link copied to clipboard
class BoxShadow(hOffset: <Error class: unknown class><Number, UNIT>? = null, vOffset: <Error class: unknown class><Number, UNIT>? = null, blurRadius: <Error class: unknown class><Number, UNIT>? = null, spreadRadius: <Error class: unknown class><Number, UNIT>? = null, color: Color? = null, inset: Boolean = false)

Type-safe definition of CSS box shadow.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface ClassSetBuilder

A builder in order to create a set of CSS-classes

Link copied to clipboard
enum Clear : Enum<Clear>

Definitions of CSS clear options.

Link copied to clipboard
enum Col : Enum<Col>

Definitions of CSS color names.

Link copied to clipboard
class Color(val color: String? = null)

Type-safe definition of CSS color.

Link copied to clipboard
interface Component

Base interface for all components.

Link copied to clipboard
interface Container : Component

Base interface for all containers.

Link copied to clipboard
interface CssClass
Link copied to clipboard
typealias CssSize = <Error class: unknown class><Number, UNIT>

This type is used for defining CSS dimensions (width, heights, margins, paddings, etc.).

Link copied to clipboard
enum Cursor : Enum<Cursor>
Link copied to clipboard

Definitions of CSS text direction options.

Link copied to clipboard

Definitions of CSS display options.

Link copied to clipboard
interface DomAttribute
Link copied to clipboard
enum Easing : Enum<Easing>
Link copied to clipboard

CSS flexbox directions.

Link copied to clipboard

CSS flexbox wrap modes.

Link copied to clipboard

Definitions of CSS font style options.

Link copied to clipboard

Definitions of CSS font variant options.

Link copied to clipboard

Definitions of CSS font weight options.

Link copied to clipboard

CSS grid flow options.

Link copied to clipboard
open class InheritingStyle(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, val parentStyle: Style? = null, init: InheritingStyle.() -> Unit? = null) : Style

CSS style object that inherits all properties from its parent.

Link copied to clipboard

CSS flexbox/grid content justification options.

Link copied to clipboard

CSS grid items justification options.

Link copied to clipboard
class LazyCache<T : Any>(val initializer: () -> T) : SingleObjectCache<T>

A cache that behaves like a resettable Lazy: It generates a value from a given initializer lazily, however that cache can be cleared, so that the value will be regenerated when queried next

Link copied to clipboard

Definitions of CSS line-break options.

Link copied to clipboard
class ListStyle(type: ListStyleType? = null, position: ListStylePosition? = null, image: ResString? = null)

Type-safe definition of CSS list style.

Link copied to clipboard

CSS list style position options.

Link copied to clipboard

CSS list style type options.

Link copied to clipboard
class Outline(width: <Error class: unknown class><Number, UNIT>? = null, style: OutlineStyle? = null, color: Color? = null)

Type-safe definition of CSS outline.

Link copied to clipboard

Definitions of CSS outline styles.

Link copied to clipboard

Definitions of CSS overflow options.

Link copied to clipboard

Definitions of CSS overflow-wrap options.

Link copied to clipboard
enum PClass : Enum<PClass>

CSS pseudo classes.

Link copied to clipboard

CSS pseudo elements.

Link copied to clipboard

Tooltip / Popover placements.

Link copied to clipboard
data class PopoverOptions(val content: String? = null, val title: String? = null, val rich: Boolean? = null, val animation: Boolean? = null, val delay: Int? = null, val hideDelay: Int? = null, val placement: Placement? = null, val triggers: List<Trigger>? = null, val sanitize: Boolean? = null)

Popover options.

Link copied to clipboard

Definitions of CSS float options.

Link copied to clipboard

Definitions of CSS position options.

Link copied to clipboard
enum Resize : Enum<Resize>

Definitions of CSS resize options.

Link copied to clipboard
typealias ResString = String

This type is used for accessing resources with CommonJS require function.

Link copied to clipboard
interface SingleObjectCache<T : Any>
Link copied to clipboard
typealias StringBoolPair = <Error class: unknown class><String, Boolean>

Helper type used to define CSS classes.

Link copied to clipboard
typealias StringPair = <Error class: unknown class><String, String>

Helper type used to define CSS style attributes.

Link copied to clipboard
open class Style(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, val parentStyle: Style? = null, init: Style.() -> Unit? = null) : StyledComponent

CSS style object.

Link copied to clipboard
abstract class StyledComponent

Base class for components supporting CSS styling.

Link copied to clipboard
value class StyleRefreshDelegate<T>(refreshFunction: (T) -> Unit)
Link copied to clipboard

Definitions of CSS text align options.

Link copied to clipboard
class TextDecoration(line: TextDecorationLine? = null, style: TextDecorationStyle? = null, color: Color? = null)

Type-safe definition of CSS text decoration.

Link copied to clipboard

Definitions of CSS text decoration line options.

Link copied to clipboard

Definitions of CSS text decoration style options.

Link copied to clipboard

Definitions of CSS text overflow options.

Link copied to clipboard
class TextShadow(hShadow: <Error class: unknown class><Number, UNIT>? = null, vShadow: <Error class: unknown class><Number, UNIT>? = null, blurRadius: <Error class: unknown class><Number, UNIT>? = null, color: Color? = null)

Type-safe definition of CSS text shadow.

Link copied to clipboard

Definitions of CSS text transform options.

Link copied to clipboard
data class TooltipOptions(val title: String? = null, val rich: Boolean? = null, val animation: Boolean? = null, val delay: Int? = null, val hideDelay: Int? = null, val placement: Placement? = null, val triggers: List<Trigger>? = null, val sanitize: Boolean? = null)

Tooltip options.

Link copied to clipboard
class Transition(property: String, duration: Double, timingFunction: String? = null, delay: Double? = null)

Type-safe definition of CSS transition.

Link copied to clipboard

Tooltip / Popover triggers.

Link copied to clipboard

Definitions of CSS unicode-bidi options.

Link copied to clipboard
enum UNIT : Enum<UNIT>

Definitions of CSS units.

Link copied to clipboard

Definitions of CSS vertical align options.

Link copied to clipboard

Definitions of CSS white space options.

Link copied to clipboard
open class Widget(className: String? = null, init: Widget.() -> Unit? = null) : StyledComponent, Component

Base widget class. The parent of all component classes.

Link copied to clipboard
value class WidgetRefreshDelegate<T>(refreshFunction: (T) -> Unit)
Link copied to clipboard
class WidgetWrapper(wrapped: Component?, className: String? = null) : SimplePanel

This class allows to wrap a component into separately styled DIV element.

Link copied to clipboard

Definitions of CSS word-break options.

Properties

Link copied to clipboard
val KVScope: <Error class: unknown class>

Functions

Link copied to clipboard
Link copied to clipboard
fun Component.addBsBorder(vararg bsBorder: BsBorder)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Component.addBsRounded(vararg bsRounded: BsRounded)
Link copied to clipboard
fun Widget.animate(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null, styles: StyledComponent.() -> Unit)

Animate the widget changing CSS properties.

Link copied to clipboard
fun buildAttributeSet(delegate: (builder: AttributeSetBuilder) -> Unit): Attrs
Link copied to clipboard
fun buildClassSet(delegate: (builder: ClassSetBuilder) -> Unit): Classes
Link copied to clipboard

Disables popover for the current widget.

Link copied to clipboard

Disables tooltip for the current widget.

Link copied to clipboard
fun Widget.enablePopover(options: PopoverOptions = PopoverOptions())

Enables popover for the current widget.

Link copied to clipboard
fun Widget.enableTooltip(options: TooltipOptions = TooltipOptions())

Enables tooltip for the current widget.

Link copied to clipboard
fun Widget.fadeIn(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Shows current widget with fade in effect.

Link copied to clipboard
fun Widget.fadeOut(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Hides current widget with fade out effect.

Link copied to clipboard
fun Component.getElementJQuery(): <Error class: unknown class>?

Returns JQuery element bound to the current component.

Link copied to clipboard

Returns JQuery element bound to the current component as a dynamic type.

Link copied to clipboard
fun Widget.hideAnim(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Hides current widget with animation effect.

Link copied to clipboard

Hides popover for the current widget.

Link copied to clipboard

Hides tooltip for the current widget.

Link copied to clipboard
fun inheritingStyle(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, parentStyle: Style? = null, init: InheritingStyle.() -> Unit? = null): InheritingStyle

DSL builder extension function.

Link copied to clipboard
fun Style.inheritingStyle(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, init: InheritingStyle.() -> Unit? = null): Style

DSL builder extension function for cascading styles.

fun Widget.inheritingStyle(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, parentStyle: Style? = null, init: InheritingStyle.() -> Unit? = null): InheritingStyle

DSL builder extension function.

Link copied to clipboard
inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>) -> dynamic)

Helper function for defining jquery event types.

inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic) -> dynamic)

Helper function for defining jquery event types with additional argument.

inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic, dynamic) -> dynamic)
inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic, dynamic, dynamic) -> dynamic)
inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic, dynamic, dynamic, dynamic) -> dynamic)
inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic, dynamic, dynamic, dynamic, dynamic) -> dynamic)
inline fun <T> SnOn<T>.jqueryEvent(name: String, noinline handler: (<Error class: unknown class>, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic) -> dynamic)

Helper function for defining jquery event types with additional arguments.

Link copied to clipboard
inline fun <T : Widget> T.onChange(noinline handler: T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on change event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onChangeLaunch(coroutineScope: <Error class: unknown class> = KVScope, noinline handler: suspend T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on change suspending event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onClick(noinline handler: T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on click event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onClickLaunch(coroutineScope: <Error class: unknown class> = KVScope, noinline handler: suspend T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on click suspending event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onEvent(noinline block: SnOn<T>.() -> Unit): Int

An extension function for defining event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onEventLaunch(event: String, coroutineScope: <Error class: unknown class> = KVScope, noinline handler: suspend T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on change suspending event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onInput(noinline handler: T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on change event handlers.

Link copied to clipboard
inline fun <T : Widget> T.onInputLaunch(coroutineScope: <Error class: unknown class> = KVScope, noinline handler: suspend T.(<Error class: unknown class>) -> Unit): Int

An extension function for defining on input suspending event handlers.

Link copied to clipboard
Link copied to clipboard
fun Component.removeBsBorder(vararg bsBorder: BsBorder)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Component.removeBsRounded(vararg bsRounded: BsRounded)
Link copied to clipboard
fun Widget.showAnim(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Shows current widget with animation effect.

Link copied to clipboard

Shows popover for the current widget.

Link copied to clipboard

Shows tooltip for the current widget.

Link copied to clipboard
fun Widget.slideDown(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Shows current widget with slide down effect.

Link copied to clipboard
fun Widget.slideUp(duration: Int = 400, easing: Easing = Easing.SWING, complete: () -> Unit? = null)

Hides current widget with slide up effect.

Link copied to clipboard
fun style(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, init: Style.() -> Unit? = null): Style

DSL builder extension function.

Link copied to clipboard
fun Style.style(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, init: Style.() -> Unit? = null): Style

DSL builder extension function for cascading styles.

fun Widget.style(selector: String? = null, pClass: PClass? = null, pElement: PElement? = null, mediaQuery: String? = null, init: Style.() -> Unit? = null): Style

DSL builder extension function.

Link copied to clipboard
fun PopoverOptions.toJs(): dynamic

Convert PopoverOptions to JavaScript JSON object.

fun TooltipOptions.toJs(): dynamic

Convert TooltipOptions to JavaScript JSON object.

Link copied to clipboard
fun Container.widget(className: String? = null, init: Widget.() -> Unit? = null): Widget

DSL builder extension function.