<HTML><HEAD><metacharset="UTF-8"><title>Widget - kvision</title><linkrel="stylesheet"href="../../../style.css"></HEAD><BODY><ahref="../../index.html">kvision</a> / <ahref="../index.html">pl.treksoft.kvision.core</a> / <ahref="./index.html">Widget</a><br/><br/><h1>Widget</h1><code><spanclass="keyword">open</span><spanclass="keyword">class </span><spanclass="identifier">Widget</span> <spanclass="symbol">:</span> <ahref="../-styled-component/index.html"><spanclass="identifier">StyledComponent</span></a></code><p>Base widget class. The parent of all component classes.</p><p>A simple widget is rendered as HTML DIV element.</p><h3>Constructors</h3><table><tbody><tr><td><p><ahref="-init-.html"><init></a></p></td><td><code><spanclass="identifier">Widget</span><spanclass="symbol">(</span><spanclass="identifier"id="pl.treksoft.kvision.core.Widget$<init>(kotlin.collections.Set((kotlin.String)))/classes">classes</span><spanclass="symbol">:</span> <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html"><spanclass="identifier">Set</span></a><spanclass="symbol"><</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><spanclass="identifier">String</span></a><spanclass="symbol">></span> <spanclass="symbol">=</span> setOf()<spanclass="symbol">)</span></code><p>Creates basic Widget with given CSS class names.</p></td></tr></tbody></table><h3>Properties</h3><table><tbody><tr><td><p><ahref="draggable.html">draggable</a></p></td><td><code><spanclass="keyword">var </span><spanclass="identifier">draggable</span><spanclass="symbol">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><spanclass="identifier">Boolean</span></a><spanclass="symbol">?</span></code><p>Determines if the current widget is draggable.</p></td></tr><tr><td><p><ahref="event-target.html">eventTarget</a></p></td><td><code><spanclass="keyword">var </span><spanclass="identifier">eventTarget</span><spanclass="symbol">: </span><ahref="./index.html"><spanclass="identifier">Widget</span></a><spanclass="symbol">?</span></code></td></tr><tr><td><p><ahref="id.html">id</a></p></td><td><code><spanclass=&