Elements

View Source

Like binding DOM nodes, most Components support binding their top-level layout HTMLElement via the element property instead of this.

<script>
    import {Button} from "@kahi-ui/framework";

    let element = null;

    $: console.log({element});
</script>

<Button bind:element>I reference a button!</Button>