Documentation Index
Fetch the complete documentation index at: https://docs.velt.dev/llms.txt
Use this file to discover all available pages before exploring further.
- Listen to when a comment pin is clicked.
- Use this to get information about which pin was clicked and implement custom actions like navigation, analytics tracking, or opening a custom comment dialog.
React / Next.js
Other Frameworks
// Using Hook
const commentPinClickedEvent = useCommentEventCallback('commentPinClicked');
useEffect(() => {
if (commentPinClickedEvent) {
console.log('Comment pin clicked:', commentPinClickedEvent);
}
}, [commentPinClickedEvent]);
// Using API
const commentElement = client.getCommentElement();
commentElement.on('commentPinClicked').subscribe((eventData) => {
console.log('Comment pin clicked:', eventData);
});
const commentElement = Velt.getCommentElement();
commentElement.on('commentPinClicked').subscribe((eventData) => {
console.log('Comment pin clicked:', eventData);
});
Event Data: CommentPinClickedEvent