One package
Choose your framework adapter. The comment UI stays the same.
Developer guide
Add CommentKit once. Review on the live site, then pick up the same feedback on localhost.
Choose your framework adapter. The comment UI stays the same.
Use one project across your allowed website hosts.
A project key identifies the workspace. Members sign in to use it.
localhost if you develop locally.npm install @commentkit/[email protected] react react-domScreenshot capture is optional. To enable it, also run npm install html2canvas in your app, or configure a custom screenshotProvider. See screenshot setup.
It identifies your project and loads its settings and realtime configuration. Keep server credentials and session tokens private; they do not belong in this configuration.
Replace your-project-api-key with the key from your project. Mount CommentKit once in your app.
All adapters use the same isolated React comment UI. Keep react and react-dom installed, including in apps using another framework. They are optional peers for headless consumers, so install matching React and ReactDOM versions (18 or later) explicitly when using the UI.
import { CommentKit } from '@commentkit/comment-kit/react';
export default function App() {
return (
<CommentKit apiKey="your-project-api-key">
<YourApp />
</CommentKit>
);
}Mount CommentKit once in your app. Its controls live in a Shadow DOM so your page styles stay separate.
Use the same project key on your deployed site and local app. Allow each hostname in project settings and sign in with an account that belongs to the project’s team.
Open the same path and query string locally. Element comments use selectors and page context to find their place, so keep the relevant elements present as you work.
The developer export tools appear on localhost and loopback hosts. Select the comments you want, copy their context, and paste it into your coding agent.
Exports can include comment text, selectors and XPath. Install the optional source resolver to add file locations and component details when your framework and development build expose that information. Source file and line information is not available on every framework or production build; selectors remain available as a fallback.
npm install element-sourceYour agent still needs access to your code. Review its changes and verify the page before resolving the comment.
Copying context works with the published SDK. For agents that need to retrieve feedback, comment-kit-mcp 0.1.0 is available separately. Its three read-only tools can list, search and retrieve threads. Follow the package setup guide with Node.js 20+ and an authenticated team member token. MCP is optional; clipboard handoff works without it.
To capture screenshots, install html2canvas or provide a custom screenshotProvider. Commenting does not require a screenshot provider.
npm install html2canvasPassword inputs are excluded from the built-in capture. Mark other sensitive elements with data-commentkit-redact to exclude them too. A custom screenshot provider must apply its own redaction rules.
Set branch to the branch your app was built from. Use main on production and your feature branch on a preview. On localhost, use the same project key and select the branch you want to review from the comments panel.
new CommentKit({
apiKey: 'your-project-api-key',
branch: 'main',
});The branch menu filters what you see. New feedback keeps the branch configured on the host, even when you are viewing another branch or all branches. The Page tab matches the current path and query string; All includes other pages in the project.
Search and filters cover loaded comments. Use Load more comments to include older threads. If a paid plan expires, team members can still view and export feedback; adding or changing it requires an active plan.
The separate comment-kit-mcp package runs locally over stdio. Authenticated read-only tools retrieve focused feedback and thread context; they do not change comments or execute instructions in feedback.
Adds persistent reply quotes, attachments, reactions, assignees and checklists, with shared styles across all framework adapters. The UI and tools load when needed, and the package includes a separate headless entry and private browser-local demo.