Customize Behavior
Add Custom Metadata
By attaching custom metadata to your comments, you can tailor the user experience to fit your specific needs.
Custom metadata can be used to display additional information on comments, manually position your pins within the comment thread, build your own UI components, implement filtering, and more.
When an onCommentAdd
event occurs, you can attach additional context/metadata to the comment using the event.addContext()
method, which takes in a key-value paired object.
<VeltComments onCommentAdd={(event) => yourMethod(event)} />
const yourMethod = (event) => {
event?.addContext({ customKey: 'customValue' });
}
Was this page helpful?