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

NameTypeDefaultDescription
box'border-box' | 'content-box' | 'device-pixel-content-box''border-box'Indicates which type of box model the observer should observe.
disabledbooleanfalseDisables the action.

Events

NameTypeDescription
aa_resize(event: CustomEvent<{ entry: ResizeObserverEntry }>) => voidEmitted when the element resizes.