Embed a customizable commenting experience into your product to enable people to collaborate. Liveblocks Comments is fully customizable, enabling you to create all kinds of commenting experiences that look and feel like your product. With Comments, you can build things like mentions, thread resolution, text annotations, video annotations, and more.
Learn more about the overall philosophy for Liveblocks Comments through a few opinions and design decisions. Comments is meant to be fully customizable, enabling you to create all kinds of commenting experiences that look and feel like your product. With Comments, you can build things like mentions, thread resolution, text annotations, video annotations, and more.
When posting a comment, we do not store the author name or avatar. We only store the author ID. We believe that it’s easier for you to retrieve users metadata when needed instead of synchronizing your database of users with Liveblocks.
With metadata available at the threads level, you can tailor your commenting experience to your specific needs by refining and shaping it.
Some examples of custom requirements include:
Deleting a comment from the client only soft deletes it: comment.body
is
removed and comment.deletedAt
is added. We keep a placeholder so that the
missing comments can still be noticed, giving you the choice on how to display
deleted comments: either through a clear “message deleted” indicator or by not
displaying it. Note that a thread is fully deleted when all its comments have
been deleted.
To build comments in your application, you have two primary design implementation pathways:
Our admiration for Radix runs deep. Their approach to low-level components has been a beacon of inspiration as we crafted the primitives.
Note that these two options are not separate paths. Both approaches can be
combined to suit your needs for both speed (default components) and
customization (primitives). One could imagine building their own <Comment />
component from scratch using the primitives and still use the default
<Composer />
component.
Webhooks are the foundation for extending Liveblocks in any way you want. You can subscribe to any comments-related events, such as creation, edition and deletion.
With Webhooks, you can leverage your own email marketing tool to send emails, apply your product’s branding, choose your notification strategy, or even synchronize threads in Slack.
To use our Webhooks, please follow our guide and/or take a look at our example specific to comments events.