solid-resize-observer
v0.1.3
Published
Resize observer for solid
Downloads
3
Maintainers
Readme
sc-resize-observer
Resize observer for Solidjs.
Install
Usage
import ResizeObserver from "sc-resize-observer";
import { render } from "solid-js/web";
const root = document.getElementById("root");
render(
<ResizeObserver
onResize={() => {
console.log("resized!");
}}
>
<textarea />
</ResizeObserver>,
root
);
API
| Property | Type | Default | Description | | -------- | --------------------------- | ------- | ------------------------------- | | disabled | boolean | false | | | onResize | ({ width, height }) => void | - | Trigger when child node resized |