Threaded Comments Props
TheThreadedCommentSection component follows a minimal props philosophy. It works with just entityId and offers optional props for specific needs.
Component Import
Props Interface
Entity Identification
Provide one of these to identify which entity the comments belong to:entity
Type: Entity | undefined | null
A complete Entity object.
useFetchEntity or similar hooks.
entityId
Type: string | undefined | null
The internal Sublay ID for the entity.
foreignId
Type: string | undefined | null
Your external/custom ID for the entity. The component will find or create the Sublay entity automatically.
shortId
Type: string | undefined | null
A short, human-readable identifier (if you’ve set one on the entity).
You only need ONE of these props. Use whichever fits your data model best.
Optional Props
isVisible
Type: boolean — Default: true
Controls whether the comment section is visible. Useful when rendering inside a drawer, modal, or conditional layout.
highlightedCommentId
Type: string | undefined | null
ID of a specific comment to highlight when the section loads. The component scrolls to it and applies a highlight that fades after a few seconds.
theme
Type: 'light' | 'dark' — Default: 'light'
Only for the inline styles variant. Sets the color theme for the entire comment section.
- Inline Styles Variant
- Tailwind Variant
Uses the
theme prop to conditionally render dark or light colors:children
Type: React.ReactNode
Optional content rendered within the comment feed area.
Complete Examples
Minimal Usage
With Dark Mode (Inline Styles)
With Highlighted Comment
Full Example
Next Steps
File Structure
Understand component organization
Features
Explore all features
Customization
Customize the component
Installation
Installation guide

