Plugins

Floating Say

Pro speech bubble positioning powered by Floating UI.

FloatingSayPlugin

FloatingSayPlugin is the direct Pro version of SayPlugin. It keeps the same .say() API, but adds Floating UI based placement, collision handling, flipping, shifting, and automatic repositioning.

Demo

Installation

The plugin is included in the @cursor.js/pro package.

npm install @cursor.js/pro @cursor.js/core

Basic Usage

import { Cursor } from '@cursor.js/core';
import { FloatingSayPlugin } from '@cursor.js/pro';

const cursor = new Cursor();
cursor.use(new FloatingSayPlugin());

cursor.hover('.btn').say('This bubble stays in view.').click();

Without FloatingSayPlugin

If you do not want to use the dedicated plugin class, you can attach the same positioning behavior to the core SayPlugin manually:

import { Cursor, SayPlugin } from '@cursor.js/core';
import { createFloatingSayPositioner } from '@cursor.js/pro';

const cursor = new Cursor();
cursor.use(
  new SayPlugin({
    positioner: createFloatingSayPositioner(),
  }),
);

Options

Prop

Type