Sublay Components
Sublay provides a CLI-based component distribution system inspired by shadcn/ui. Instead of hiding UI components innode_modules, Sublay copies the full source code directly into your project so you own and control every line.
The philosophy: Copy, paste, customize. Not install and configure.You get source code, not packages. You own your components and can modify anything.
How It Works
1
Initialize Sublay
2
Add Components
src/components/ directory as editable source files. --ref v8 reads the component from the v8 branch of the registry, where the v8 components live.3
Use & Customize
entityId, or the entity object itself. The component works out of the box. Want to customize? Edit the source files directly.For a record in your own database, pass its ID as foreignId with createIfNotFound instead; see Attach comments to records you already have.Available Components
Threaded Comments
Reddit-style threaded discussions with:
- Unlimited nesting depth
- Upvote/downvote system
- Visual threading lines
- Collapsible threads
Social Comments
Instagram-style social comments with:
- Single-level nesting
- Heart/like system
- Clean, minimal design
- Top/New/Old sorting
Notification Control
Dropdown notification bell control with:
- Real-time notification updates
- Smart viewport positioning
- Mark as read functionality
- Infinite scroll
Styling Options
Each component comes in two styling variants:Inline Styles
- All styles as
style={{}}objects in JSX - No external dependencies
- Works everywhere
- Easy to find and change colors
- Theme support via conditional logic
Tailwind CSS
- Utility classes for styling
- Requires Tailwind CSS 3.3 or later (4 included) on React, and NativeWind 4 on React Native and Expo
- Dark mode: the
dark:prefix on React, thethemeprop on React Native and Expo - More concise code
- Easy to integrate with design systems
init — you can switch by re-running add commands.
What Gets Installed
When you add a comment component, about 40 TypeScript/TSX files are copied into your project (threaded comments: 42 on React, 43 with Tailwind, 47 on React Native and Expo; social comments: 43 on React, 44 with Tailwind, 44 on React Native and Expo, 43 with Tailwind), plus theindex.ts the CLI writes:
- ✅ Visible in your project
- ✅ Editable
- ✅ TypeScript with full type annotations
- ✅ Self-documenting with inline comments
Required Dependencies
Components depend on Sublay’s core libraries for data fetching, real-time updates, authentication, and more. The files in a component’sshared/ folder add a few third-party packages.
For React (Web):
For React Native / Expo:
Reanimated 4 and later also need
react-native-worklets: on Expo, add installs it with Reanimated; on React Native, follow Reanimated’s install steps.
The CLI checks for these and offers to install them automatically. On Expo it installs them with npx expo install, so each matches your Expo SDK.
Getting Started
CLI Setup
Install the CLI and configure your project
Quick Start
Install a component and render it on your entities
Customization
Learn how to customize colors, layout, and functionality
Component Types
Compare available components and choose the right one
Philosophy
The Sublay CLI follows these principles:- Minimal Props — Components work with a single prop that identifies the entity. No complex configuration required.
- Sensible Defaults — Beautiful, accessible styling out of the box.
- Edit, Don’t Configure — Customize by editing source code, not passing config objects.
- Progressive Disclosure — Ignore implementation details until you need to customize.
- Self-Documenting Code — Clear file names, thorough comments, and color palettes documented in headers.

