import Moveable, { ResizableRequestParam } from "lit-moveable"; import { LitElement, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import { ref, createRef } from "lit/directives/ref.js"; @customElement("lit-app") export default class App extends LitElement { moveableRef: Ref = createRef(null); render() { return html `
Target1
`; } onClick() { this.moveableRef.value!.request( "resizable", { deltaHeight: 12 }, true ); } onResize(e) { e.target.style.width = `${e.width}px`; e.target.style.height = `${e.height}px`; const input = document.querySelector(".input")!; input.innerHTML = JSON.stringify({ dist: e.dist, width: e.width, height: e.height }); } }