Skip to content

useManipulation

Read as Markdown

import { useManipulation, useSignal } from "@pibbl/core";

useManipulation(options) creates one controller for the mounted component. Pass a writable box signal and attach controller.frameProps to a ManipulationFrame. Descendant handles start interactions; active and snapshot expose readonly signal state, and cancel() restores the starting geometry for an active interaction.

const box = useSignal({ left: 40, top: 32, width: 180, height: 100 });
const manipulation = useManipulation({ box, move: {}, resize: {} });

Related types: PibblManipulationController, PibblManipulationOptions.

Creates a mount-owned controller for moving, resizing, and rotating declared geometry.

useManipulation: (options: PibblManipulationOptions) => PibblManipulationController

Related API: useManipulation, PibblManipulationOptions, PibblManipulationController.

Stable controls and state for the mounted manipulation interaction. See PibblManipulationController .

PibblManipulationOptions

PibblManipulationController

View source — packages/core/src/lib/manipulation/controller.ts:194

Read the Input, focus, and native HTML companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.