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
One of these is required to identify which entity (post, article, etc.) the comments belong to:entity
Type: Entity | undefined | null
A complete Entity object.
useFetchEntity or similar hooks.
entityId
Type: string | undefined | null
The internal Replyke ID for the entity.
foreignId
Type: string | undefined | null
Your external/custom ID for the entity.
shortId
Type: string | undefined | null
A short, human-readable identifier (if you’ve set one).
You only need ONE of these props. They’re mutually compatible — 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.
- Deep-linking from notifications
- Jumping to a specific comment from a URL param
- Drawing attention to a particular comment
- The component scrolls to the highlighted comment
- The comment is visually highlighted (background color change)
- Highlight fades after a few seconds
theme
Type: 'light' | 'dark'
Default: 'light'
Only for styled (inline styles) variant. Sets the color theme for the entire comment section.
- Inline Styles Variant
- Tailwind Variant
Uses this prop. Component checks Wire it to your app’s theme state for synchronized dark mode.
theme prop and conditionally renders dark or light colors:children
Type: React.ReactNode
Optional React node(s) rendered within the comment feed area.
Complete Examples
Minimal Usage
With Dark Mode (Inline Styles)
With Highlighted Comment
Full Example with All Props
TypeScript Support
The component is fully typed. Import types if needed:Next Steps
File Structure
Understand component organization
Features
Explore all features
Customization
Customize the component
Installation
Installation guide

