Skip to content

@vowel.to/client v0.1.2-393


@vowel.to/client / index / useFloatingCursor

Function: useFloatingCursor()

ts
function useFloatingCursor(): FloatingCursorContextType;

Defined in: lib/vowel/components/FloatingCursorProvider.tsx:160

Hook to access floating cursor context

Use this in custom components that need to control the floating cursor.

Returns

FloatingCursorContextType

Example

tsx
function MyAutomationComponent() {
  const { updateCursor } = useFloatingCursor();
  
  const handleAction = () => {
    updateCursor({ x: 50, y: 50, text: 'Clicking button', isIdle: false });
  };
  
  return <button onClick={handleAction}>Perform Action</button>;
}