Overview
The WeaveUsersSelectionPlugin class that enables real-time user selection sharing across all connected users on the collaborative canvas. It displays live what each user is selecting, allowing participants to see each other’s activity and collaborate more intuitively.
This plugin helps create a shared sense of presence, making collaborative tools feel dynamic, interactive, and truly multi-user.
The class extends the WeavePlugin class
TypeScript types
type WeaveUser = {
[key: string]: any;
name: string;
email: string;
};
type WeaveUsersSelectionPluginConfig = {
getUser: () => WeaveUser;
getUserColor: (user: WeaveUser) => string | CanvasGradient | undefined;
};
type WeaveUsersSelectionPluginParams = {
config: WeaveUsersSelectionPluginConfig;
};
Parameters
For WeaveUsersSelectionPluginParams:
| Property | Type | Required | Description |
|---|---|---|---|
|
|
Config parameters for the plugin. |
For WeaveUsersSelectionPluginConfig:
| Property | Type | Required | Description |
|---|---|---|---|
|
|
A function that returns the actual instance user metadata. |
|
|
|
A function that returns the color (#RGB or #RGBA) to use to set the selector for the user. |