Installing Social Comments
Add Instagram-style social comments to your project with a single command.Prerequisites
1
Initialize CLI
sublay.json configuration file. Select your platform and styling preference.2
Install the Sublay SDK
React (Web):React Native:Expo:The component’s other packages are listed under Required Dependencies.
add offers to install any that are missing.Installation Command
--ref v8 reads the component from the v8 branch of the registry, where the v8 components live.
What Gets Installed
The CLI copies 43 files into your project on React (44 with Tailwind), and 44 on React Native and Expo (43 with Tailwind): the component’s own 26 files, and the shared pieces it is built from inshared/. Every file is yours to edit, the shared pieces included.
- React (Web)
- React Native / Expo
Using the Component
entityId (or pass the entity object). For a record in your own database, pass its ID as foreignId with createIfNotFound instead; see Attach comments to records you already have.
Make sure your app is wrapped with
<SublayProvider>. See the Quick Start Guide for setup details.On React Native and Expo, the sheets (the comment menu, Report) also need your whole app wrapped in
<GestureHandlerRootView style={{ flex: 1 }}> from react-native-gesture-handler. Without it they don’t open or drag. react-native-reanimated needs its Babel setup too: Expo’s preset does it for you; on React Native, follow Reanimated’s install steps.The Tailwind variant on React Native and Expo needs NativeWind set up in your app, or the components render unstyled. See Tailwind on React Native and Expo.
Platform Support
Switching Styling Variants
1
Delete Current Components
2
Update Configuration
Edit
sublay.json:3
Re-install
Next Steps
Props & API
Learn about available props
Customization
Customize the component
Features
Explore all features
File Structure
Understand file organization

