Actions
Resize
Description
The Resize action can be used to get notified when an element is resized.
Usage
<script lang="ts">
import { resize } from 'action-archive';
</script>
<div use:resize on:aa_resize={...} />
Example
Width: undefined
Height: undefined
API
Parameters
Name | Type | Default | Description |
---|---|---|---|
box | 'border-box' | 'content-box' | 'device-pixel-content-box' | 'border-box' | Indicates which type of box model the observer should observe. |
disabled | boolean | false | Disables the action. |
Events
Name | Type | Description |
---|---|---|
aa_resize | (event: CustomEvent<{ entry: ResizeObserverEntry }>) => void | Emitted when the element resizes. |