Installing Threaded Comments
Add Reddit-style threaded comments to your project with a single command.Prerequisites
1
Initialize CLI
sublay.json configuration file.2
Install Dependencies
React (Web):React Native:Expo:
Installation Command
What Gets Installed
The CLI will:- Fetch the component from the registry based on your
sublay.jsonplatform and style settings - Copy ~25 files into your project at
{componentsPath}/comments-threaded/ - Transform imports to work with your project structure
- Create
index.tsbarrel export for clean imports - Display usage examples and required dependencies
File Structure Created
Using the Component
After installation, import and use the component:Make sure your app is wrapped with
<SublayProvider>. See the Quick Start Guide for setup details.Switching Styling Variants
To switch between Tailwind and Inline Styles after installation:1
Delete Current Components
2
Update Configuration
Edit
sublay.json:3
Re-install
Troubleshooting
Import errors
Import errors
Make sure your import path matches your
paths.components in sublay.json:TypeScript errors
TypeScript errors
Ensure your
tsconfig.json includes the components directory:Component already exists
Component already exists
Re-running Because these files are yours to edit, any customizations you made are
replaced. Commit (or back up) your changes before re-adding a component:
add overwrites the existing installation. The CLI prints a
warning first, then proceeds:Next Steps
Props & API
Learn about available props
File Structure
Understand the component organization
Customization
Customize colors, layout, and functionality
Features
Explore all features

