We recommend that you familiarize yourselves with UI Customization Concepts before attempting to modify any components.
Overview
The Comment Sidebar V2 Primitives API provides 27+ granular components that can be used independently to build completely custom sidebar interfaces. Unlike the V1 sidebar’s monolithic structure, every section of the V2 sidebar is an independently importable and composable primitive. Each primitive can be used standalone or composed together for maximum customization flexibility. Key features of the V2 architecture:- Flat primitive components — each UI section is individually replaceable
- Unified filter model — replaces the legacy
minimalFilter+advancedFilterssystem - CDK virtual scroll — renders only the visible viewport slice for smooth performance on large comment sets
- Focused-thread view — opens individual threads in a dedicated view inside the sidebar
- Conditional styling — all primitives support
velt-classconditional styling viaapplyConditionalClasses
Usage Patterns
Pattern 1: Drop-in Replacement
UseVeltCommentsSidebarV2 as a direct replacement for VeltCommentsSidebar.
- React / Next.js
- Other Frameworks
Pattern 2: Version Prop on Existing Sidebar
Route the existingVeltCommentsSidebar to the V2 implementation by setting version="2".
- React / Next.js
- Other Frameworks
Pattern 3: Compose from Primitives
Build a fully custom sidebar by composing individual primitives.- React / Next.js
- Other Frameworks
Components
VeltCommentsSidebarV2
Root container for the V2 sidebar. Provides shared state context to all child primitives viaparentLocalUIState. See VeltCommentsSidebarV2Props for the type definition.
- React / Next.js
- Other Frameworks
| Prop | Type | Default | Description |
|---|---|---|---|
pageMode | boolean | false | Enable page-level comments mode |
focusedThreadMode | boolean | false | Open individual threads in a focused view inside the sidebar |
readOnly | boolean | false | Render the sidebar in read-only mode |
embedMode | string | null | null | Embed the sidebar inside a custom container |
floatingMode | boolean | false | Render the sidebar in floating mode |
position | 'left' | 'right' | 'right' | Anchor position of the sidebar panel |
variant | string | 'sidebar' | Display variant |
forceClose | boolean | true | Force the sidebar closed programmatically |
version | string | - | When set to "2" on VeltCommentsSidebar, routes to the V2 implementation |
onSidebarOpen | (data: any) => void | - | Callback fired when the sidebar opens |
onSidebarClose | (data: any) => void | - | Callback fired when the sidebar closes |
onCommentClick | (data: any) => void | - | Callback fired when a comment item is clicked |
onCommentNavigationButtonClick | (data: any) => void | - | Callback fired when the comment navigation button is clicked |
VeltCommentsSidebarV2Skeleton
Loading skeleton displayed while the sidebar content is loading.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2Panel
Main panel container that holds all sidebar content sections: header, list, empty placeholder, page-mode composer, and focused thread.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2Header
Header section of the sidebar panel. Contains the close button, minimal actions dropdown, and filter dropdown.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2CloseButton
Button to close the sidebar panel.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2MinimalActionsDropdown
Dropdown menu in the header providing bulk actions such as mark-all-read and mark-all-resolved.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2MinimalActionsDropdownTrigger
Trigger button that opens the minimal actions dropdown.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2MinimalActionsDropdownContent
Content container for the minimal actions dropdown menu items.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2MinimalActionsDropdownContentMarkAllRead
Action item that marks all comments as read.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2MinimalActionsDropdownContentMarkAllResolved
Action item that marks all comments as resolved.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdown
Dropdown menu in the header for filtering comments. Uses the unified filter model that replaces the legacyminimalFilter + advancedFilters system.
- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownTrigger
Trigger button that opens the filter dropdown.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContent
Content container for the filter dropdown.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentList
Scrollable list of filter options. Contains filter items and filter categories.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentListItem
Individual filter option within the filter list. Contains an indicator and a label.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentListItemIndicator
Visual indicator (such as a checkbox or icon) showing the active state of a filter option.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentListItemLabel
Text label for a filter option.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentListCategory
Group container for organizing filter options into categories.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FilterDropdownContentListCategoryContent
Content area within a filter category, rendering the category’s filter items.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2List
Scrollable list of comment threads. Uses CDK virtual scroll to render only the visible viewport slice, enabling smooth performance on large comment sets.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2ListItem
Individual comment thread item rendered within the list.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2EmptyPlaceholder
Placeholder displayed when no comments match the current filter or when the sidebar has no comments. Contains an optional reset-filter button.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2ResetFilterButton
Button that clears all active filters, returning the sidebar to its unfiltered state.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2PageModeComposer
Composer for creating new page-level comments directly from the sidebar. Only visible whenpageMode is enabled.
- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FocusedThread
Container for the focused-thread view that opens when a comment is clicked withfocusedThreadMode enabled. Contains a back button and the dialog container.
- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FocusedThreadBackButton
Back button that exits the focused-thread view and returns to the comment list.- React / Next.js
- Other Frameworks
VeltCommentsSidebarV2FocusedThreadDialogContainer
Container that renders the full comment dialog for the focused thread.- React / Next.js
- Other Frameworks
Component Map
All 27 primitives and their corresponding HTML elements:| React Component | HTML Element |
|---|---|
VeltCommentsSidebarV2 | velt-comments-sidebar-v2 |
VeltCommentsSidebarV2Skeleton | velt-comments-sidebar-skeleton-v2 |
VeltCommentsSidebarV2Panel | velt-comments-sidebar-panel-v2 |
VeltCommentsSidebarV2Header | velt-comments-sidebar-header-v2 |
VeltCommentsSidebarV2CloseButton | velt-comments-sidebar-close-button-v2 |
VeltCommentsSidebarV2MinimalActionsDropdown | velt-comments-sidebar-minimal-actions-dropdown-v2 |
VeltCommentsSidebarV2MinimalActionsDropdownTrigger | velt-comments-sidebar-minimal-actions-dropdown-trigger-v2 |
VeltCommentsSidebarV2MinimalActionsDropdownContent | velt-comments-sidebar-minimal-actions-dropdown-content-v2 |
VeltCommentsSidebarV2MinimalActionsDropdownContentMarkAllRead | velt-comments-sidebar-minimal-actions-dropdown-content-mark-all-read-v2 |
VeltCommentsSidebarV2MinimalActionsDropdownContentMarkAllResolved | velt-comments-sidebar-minimal-actions-dropdown-content-mark-all-resolved-v2 |
VeltCommentsSidebarV2FilterDropdown | velt-comments-sidebar-filter-dropdown-v2 |
VeltCommentsSidebarV2FilterDropdownTrigger | velt-comments-sidebar-filter-dropdown-trigger-v2 |
VeltCommentsSidebarV2FilterDropdownContent | velt-comments-sidebar-filter-dropdown-content-v2 |
VeltCommentsSidebarV2FilterDropdownContentList | velt-comments-sidebar-filter-dropdown-content-list-v2 |
VeltCommentsSidebarV2FilterDropdownContentListItem | velt-comments-sidebar-filter-dropdown-content-list-item-v2 |
VeltCommentsSidebarV2FilterDropdownContentListItemIndicator | velt-comments-sidebar-filter-dropdown-content-list-item-indicator-v2 |
VeltCommentsSidebarV2FilterDropdownContentListItemLabel | velt-comments-sidebar-filter-dropdown-content-list-item-label-v2 |
VeltCommentsSidebarV2FilterDropdownContentListCategory | velt-comments-sidebar-filter-dropdown-content-list-category-v2 |
VeltCommentsSidebarV2FilterDropdownContentListCategoryContent | velt-comments-sidebar-filter-dropdown-content-list-category-content-v2 |
VeltCommentsSidebarV2List | velt-comments-sidebar-list-v2 |
VeltCommentsSidebarV2ListItem | velt-comments-sidebar-list-item-v2 |
VeltCommentsSidebarV2EmptyPlaceholder | velt-comments-sidebar-empty-placeholder-v2 |
VeltCommentsSidebarV2ResetFilterButton | velt-comments-sidebar-reset-filter-button-v2 |
VeltCommentsSidebarV2PageModeComposer | velt-comments-sidebar-page-mode-composer-v2 |
VeltCommentsSidebarV2FocusedThread | velt-comments-sidebar-focused-thread-v2 |
VeltCommentsSidebarV2FocusedThreadBackButton | velt-comments-sidebar-focused-thread-back-button-v2 |
VeltCommentsSidebarV2FocusedThreadDialogContainer | velt-comments-sidebar-focused-thread-dialog-container-v2 |

