Skip to main content

close

Description

fires on click outside the side area

Example

<script>
import { Button, SideArea } from "wx-svelte-core";

let sideAreaVisible = false;

function openSideArea() {
sideAreaVisible = true;
}

function closeSideArea() {
sideAreaVisible = false;
}

</script>

<div>
<Button click={openSideArea}>Show Side Area</Button>
</div>

{#if sideAreaVisible}
<SideArea on:close={closeSideArea}>
<!-- Some content -->
</SideArea>
{/if}

Related article: Handling SideArea closing