Components
Copilot Hover Card
Copilot Hover Card
Display AI-generated suggestions in a hover card.
Installation
npx @udecode/plate-ui@latest add copilot-hover-card
Examples
import type { CopilotHoverCardProps } from '@udecode/plate-ai/react';
export const copilotHoverCard = ({ suggestionText }: CopilotHoverCardProps) => {
return (
<span className="text-gray-400" contentEditable={false}>
{suggestionText}
</span>
);
};
Plus examples
In Plate Plus, We using debounce mode by default. That's mean you will see the suggestion automatically without pressing Control+Space
.
We also provide a new style of hover card that is more user-friendly.You can hover on the suggestion to see the hover card.
All of the backend setup is available in Potion template.