Comments
useCommentUtils()
Hook to access comment utilities- Params:
void - Returns:
CommentElement - Related API Method:
client.getCommentElement() - Full Documentation →
Threads
useAddCommentAnnotation()
Hook to add a comment annotation- Params: AddCommentAnnotationRequest
- Returns:
addCommentAnnotation() - Full Documentation →
useDeleteCommentAnnotation()
Hook to delete a comment annotation- Params: DeleteCommentAnnotationRequest
- Returns:
deleteCommentAnnotation() - Full Documentation →
useCommentAnnotationsCount()
Hook to get total and unread comment annotations count- Params: CommentRequestQuery (optional)
- Returns: GetCommentAnnotationsCountResponse
- Full Documentation →
useUnreadCommentAnnotationCountByLocationId()
Hook to get unread comment annotation count by location- Params:
locationId: string - Returns:
UnreadCommentsCount | null - Full Documentation →
useGetCommentAnnotations()
Hook to get all the comment annotations for all the specified documents- Params: CommentRequestQuery (optional)
- Returns: GetCommentAnnotationsResponse
- Full Documentation →
useCommentAnnotationById()
Hook to get a specific comment annotation- Params:
{ annotationId: string, documentId?: string } - Returns:
CommentAnnotation - Full Documentation →
Messages
useAddComment()
Hook to add a comment to a specific annotation- Params: AddCommentRequest
- Returns:
addComment() - Full Documentation →
useUpdateComment()
Hook to update a comment in a specific annotation- Params: UpdateCommentRequest
- Returns:
updateComment() - Full Documentation →
useDeleteComment()
Hook to delete a comment from a specific annotation- Params: DeleteCommentRequest
- Returns:
deleteComment() - Full Documentation →
useGetComment()
Hook to get comments from a specific annotation- Params: GetCommentRequest
- Returns:
getComment() - Full Documentation →
useUnreadCommentCountOnCurrentDocument()
Hook to get number of unread comments on current document- Params:
void - Returns:
UnreadCommentsCount | null - Full Documentation →
useUnreadCommentCountByLocationId()
Hook to get number of unread comments by location- Params:
locationId: string - Returns:
UnreadCommentsCount | null - Full Documentation →
useUnreadCommentCountByAnnotationId()
Hook to get number of unread comments by annotation- Params:
annotationId: string - Returns:
number - Full Documentation →
@Mentions
useContactUtils()
Hook to access contact utility methods- Returns:
ContactElementwith methods for managing contacts - Full Documentation →
useAssignUser()
Hook to assign a user to a comment annotation- Params: AssignUserRequest
- Returns:
assignUser() - Full Documentation →
useContactSelected()
Hook to handle contact selection events- Returns:
User - Full Documentation →
useContactList()
Hook to subscribe to the list of users added to organization, folder, document, user groups or the ones overwritten using theupdateContactList API.
useSubscribeCommentAnnotation()
Hook to subscribe to a comment annotation- Params: SubscribeCommentAnnotationRequest
- Returns:
subscribeCommentAnnotation() - Full Documentation →
useUnsubscribeCommentAnnotation()
Hook to unsubscribe from a comment annotation- Params: UnsubscribeCommentAnnotationRequest
- Returns:
unsubscribeCommentAnnotation() - Full Documentation →
Custom Lists
useAutocompleteUtils()
Hook to access autocomplete utilities for custom lists in comments- Returns:
AutocompleteElement - Full Documentation →
useAutocompleteChipClick()
Hook to handle clicks on autocomplete chips in comments- Returns:
AutocompleteItemdata when a chip is clicked - Full Documentation →
Event Subscription
useCommentEventCallback()
Hook to subscribe to comment events- Params:
eventType: string. Here is the list of events you can subscribe to. - Returns: Comment Event Object. It will return one of the objects from here
- Full Documentation →
Attachments
useAddAttachment()
Hook to add an attachment to a comment annotation- Params: AddAttachmentRequest
- Returns:
addAttachment() - Full Documentation →
useDeleteAttachment()
Hook to delete an attachment from a comment annotation- Params: DeleteAttachmentConfig
- Returns:
deleteAttachment() - Full Documentation →
useGetAttachment()
Hook to get attachments from a comment annotation- Params: GetAttachmentRequest
- Returns:
getAttachment() - Full Documentation →
Reactions
useAddReaction()
Hook to add a reaction to a comment- Params: AddReactionRequest
- Returns:
addReaction() - Full Documentation →
useDeleteReaction()
Hook to delete a reaction from a comment- Params: DeleteReactionRequest
- Returns:
deleteReaction() - Full Documentation →
useToggleReaction()
Hook to toggle a reaction on a comment- Params: ToggleReactionRequest
- Returns:
toggleReaction() - Full Documentation →
Status & Priority
useUpdateStatus()
Hook to update the status of a comment annotation- Params: UpdateStatusRequest
- Returns:
updateStatus() - Full Documentation →
useResolveCommentAnnotation()
Hook to resolve a comment annotation- Params: ResolveCommentAnnotationRequest
- Returns:
resolveCommentAnnotation() - Full Documentation →
useUpdatePriority()
Hook to update the priority of a comment annotation- Params: UpdatePriorityRequest
- Returns:
updatePriority() - Full Documentation →
Recording
useDeleteRecording()
Hook to delete a recording from a comment annotation- Params: DeleteRecordingRequest
- Returns:
deleteRecording() - Full Documentation →
useGetRecording()
Hook to get recordings from a comment annotation- Params: GetRecordingRequest
- Returns:
getRecording() - Full Documentation →
Deep Link
useGetLink()
Hook to get a link to a specific comment annotation- Params: GetLinkRequest
- Returns:
getLink() - Full Documentation →
useCopyLink()
Hook to copy a comment annotation link to clipboard- Params: CopyLinkRequest
- Returns:
copyLink() - Full Documentation →
Navigation
useCommentSelectionChangeHandler()
Hook to subscribe to comment selection changes- Returns:
CommentSelectionChangeDatawith:selected: booleanannotation: CommentAnnotation
- Full Documentation →
UI
useUiState()
Hook to read and update UI state for use in wireframes,VeltIf, and VeltData.
- Returns:
{ uiState: Record<string, any> | null, setUiState: (data: Record<string, any>) => void } - Full Documentation →
useCommentDialogSidebarClickHandler()
Hook to handle clicks on the sidebar button in the comment dialog- Returns: Event data
- Full Documentation →
Moderation
useApproveCommentAnnotation()
Hook to approve comment annotations in moderator mode- Params: ApproveCommentAnnotationRequest
- Returns:
approveCommentAnnotation() - Full Documentation →
useAcceptCommentAnnotation()
Hook to accept comment annotations in suggestion mode- Params: AcceptCommentAnnotationRequest
- Returns:
acceptCommentAnnotation() - Full Documentation →
useRejectCommentAnnotation()
Hook to reject comment annotations in suggestion mode- Params: RejectCommentAnnotationRequest
- Returns:
rejectCommentAnnotation() - Full Documentation →
useUpdateAccess()
Hook to update access permissions for comment annotations- Params: UpdateAccessRequest
- Returns:
updateAccess() - Full Documentation →
Comment Tool
useCommentModeState()
Hook to track the current state of comment mode- Returns:
booleanindicating if comment mode is active - Automatically updates when comment mode changes
- Full Documentation →
Notifications
useNotificationSettings()
Hook to get and update notification settings for the current user- Returns:
{ setSettingsInitialConfig, setSettings, settings } - Full Documentation →
useNotificationUtils()
Hook to access notification element for utility methods- Returns:
NotificationElement - Full Documentation →
useNotificationsData()
Hook to access notifications data for the current user- Params:
- query: Optional.
GetNotificationsDataQuerytype: Filter for notification type: all, for you, or documents.forYou: returns notifications where the current user is involved.all/documents: returns all notifications from the documents the user has access to.
- query: Optional.
- Returns: Array of
Notificationobjects - Automatically updates when notifications change
- Full Documentation →
useUnreadNotificationsCount()
Hook to get count of unread notifications- Returns: Object with counts by tab
- Automatically updates when unread status changes
- Full Documentation →
Inline Reactions
useReactionElement()
Hook to access reaction element for utility methods- Returns:
ReactionElement - Full Documentation →
Recorder
useRecorderUtils()
Hook to access recorder element for utility methods- Returns:
RecorderElement - Full Documentation →
useRecorderEventCallback()
Hook to subscribe to recorder events- Params:
eventType: string. Here is the list of events you can subscribe to. - Returns: Recorder Event Object. It will return one of the objects from here
- Full Documentation →
useRecordings()
Subscribe to all recording data from either the current document or specified recorder IDs.- Params: RecorderRequestQuery (optional)
- Returns:
Observable<GetRecordingsResponse[]> - Full Documentation →
View Analytics
useViewsElement()
Hook to access views element for utility methods- Returns:
ViewsElement - Full Documentation →
useUniqueViewsByUser()
Hook to get unique views grouped by user- Params:
locationId: string - Returns: Array of view analytics data by user
- Full Documentation →
useUniqueViewsByDate()
Hook to get unique views grouped by date- Params:
locationId: string - Returns: Array of view analytics data by date
- Full Documentation →
Live State Sync
useLiveStateSyncUtils()
Hook to access live state sync utilities- Params:
void - Returns:
LiveStateSyncElement - Related API Method:
client.getLiveStateSyncElement() - Full Documentation →
useLiveStateData()
Hook to get live state data- Params:
string - Returns:
any - Related API Method:
liveStateSyncElement.getLiveStateData() - Full Documentation →
useSetLiveStateData()
Hook to set live state data- Params:
liveStateDataId:stringliveStateData:anyconfig:SetLiveStateDataConfig
- Returns:
void - Related API Method:
liveStateSyncElement.setLiveStateData() - Full Documentation →
useLiveState()
Hook to sync state variables across clients in real-time (similar to React’s useState)- Params:
uniqueId: string - Unique identifier to sync across screensinitialValue: any - Initial value of the stateoptions?: objectsyncDuration: number - Debounce duration in ms (default: 50)resetLiveState: boolean - Reset state on init (default: false)listenToNewChangesOnly: boolean - Only listen to new changes (default: false)
- Returns:
[value, setValue, serverConnectionState]value: Current state valuesetValue: Function to update stateserverConnectionState: Current server connection state
- Full Documentation →
useServerConnectionStateChangeHandler()
Hook to listen to server connection state changes- Params: none
- Returns:
ServerConnectionState- One of:'online'- Server connection is active'offline'- Server connection is lost'pendingInit'- Connection initialization pending'pendingData'- Waiting for data from server
- Related API Method:
liveStateSyncElement.onServerConnectionStateChange() - Full Documentation →
Single Editor Mode
useUserEditorState()
Hook to check if current user is the editor- Returns:
UserEditorAccessobject with:isEditor: boolean indicating if user is editorisEditorOnCurrentTab: boolean indicating if user is editor on current tab
- Full Documentation →
useEditor()
Hook to get the current editor- Returns:
Userobject with editor details (email, name, photoUrl, userId) - Full Documentation →
useEditorAccessRequestHandler()
Hook to handle editor access requests- Returns: Object with:
requestStatus: ‘requested’ when access is requestedrequestedBy: User object of requester
- Returns
nullif user is not editor or request is canceled - Full Documentation →
useEditorAccessTimer()
Hook to track editor access request timer state- Returns: Object with:
state: ‘idle’ | ‘inProgress’ | ‘completed’durationLeft: number of seconds remaining
- Useful for building custom UI for access requests
- Full Documentation →
Presence
usePresenceEventCallback()
Hook to subscribe to presence events- Params:
eventType: string. Here is the list of events you can subscribe to. - Returns: Presence Event Object. It will return one of the objects from here
- Full Documentation →
usePresenceUtils()
Hook to access presence element for presence control methods- Returns:
PresenceElement - Full Documentation →
usePresenceData()
Hook to subscribe to presence data- Params:
PresenceRequestQuery - Returns:
Observable<GetPresenceDataResponse> - Full Documentation →
Cursor
useCursorUtils()
Hook to access cursor element for cursor utility methods- Returns:
CursorElement
useCursorUsers()
Hook to get online users with cursors activated- Params:
void - Returns:
User[] - Related API Method:
cursorElement.getOnlineUsersOnCurrentDocument() - Full Documentation →
Live Selection
useLiveSelectionUtils()
Hook to access live selection element for control methods- Returns:
LiveSelectionElement - Full Documentation →
useLiveSelectionDataHandler()
Hook to get live selection data for the current document- Returns:
LiveSelectionData - Related API Method:
liveSelectionElement.getLiveSelectionData() - Full Documentation →
Huddle
useHuddleUtils()
Hook to access huddle utilities- Params:
void - Returns:
HuddleElement - Related API Method:
client.getHuddleElement() - Full Documentation →
AI
useAIRewriterUtils()
Hook to access AI rewriter utilities- Params:
void - Returns:
RewriterElement - Related API Method:
client.getRewriterElement()
Core
Client
useVeltClient()
Hook to access the Velt client instance- Returns: Object with:
client: Velt
useVeltInitState()
Hook to get Velt initialization state- Params:
void - Returns:
boolean - Related API Method:
client.getVeltInitState() - Full Documentation →
Authentication
useIdentify()
Hook to authenticate a user with Velt- Params:
user:Useroptions?: Object:authToken?: JWT token for additional securityforceReset?: Force re-login (default: false)
- Must be called within a child component of VeltProvider
- Asynchronous operation
- Full Documentation →
Document
useSetDocuments()
Hook to initialize multiple documents at once- Params:
documents: Document[]options?: SetDocumentsRequestOptions
- Full Documentation →
useSetDocument()
Hook to initialize a document for collaboration- Params:
documentId: stringmetadata?: DocumentMetadata
- Full Documentation →
useUnsetDocuments()
Hook to unsubscribe from all documents at once.- Use when Velt features are not needed
- Cleans up document-specific resources
- Full Documentation →
Location
useSetLocation()
Hook to set the current location context. Used to define specific areas within a document.- Params:
location: Location object with:id: Required unique identifierlocationName?: Optional display name for UI componentsversion?: Optional version object with:id: Version identifiername: Version display name
- Additional custom key/value pairs
isAdditional?: Boolean to add additional locationsfalse(default): Set this as the root locationtrue: Add as additional location
- Full Documentation →

