File Structure
When you install threaded comments, you get approximately 25 TypeScript/TSX files organized into a clear structure.Directory Tree
Key Files
index.ts - Entry Point
Barrel export that makes imports clean:
threaded-comment-section.tsx - Main Component
The entry component that orchestrates everything. Edit this to:
- Add custom headers or footers
- Modify the layout
- Change the overall structure
new-comment-form.tsx - Comment Input
The textarea and submit button for top-level comments. Edit this to:
- Customize placeholder text
- Change button styles
- Add character counters
- Modify form behavior
single-comment.tsx - Individual Comment
The core comment display component. Edit this to:
- Change author name styling
- Modify comment body layout
- Add custom badges or labels
- Adjust spacing and padding
vote-buttons.tsx - Voting UI
Upvote and downvote buttons with score display. Edit this to:
- Change button colors
- Modify vote count formatting
- Add animations
- Change icon styles
Common Customizations
Change Colors
Inline Styles Variant: Open any component file. Look for the color palette guide in the header:tailwind.config.js or change classes directly in files:
Modify Layout
Openthreaded-comment-section.tsx and rearrange JSX:
Remove Features
Don’t want vote buttons? Just comment them out or delete:File Responsibilities
| Directory | Purpose |
|---|---|
/components/ | All UI/JSX components |
/hooks/ | React hooks for state and logic |
/utils/ | Helper functions (memoization, etc.) |
/context/ | React context providers |
/modals/ | Modal dialogs (report, actions) |

