Skip to main content

Social Comments Props

Minimal props API for Instagram-style social comments.

Props Interface

interface SocialCommentSectionProps {
  // Entity identification (ONE required)
  entity?: Entity | undefined | null;
  entityId?: string | undefined | null;
  foreignId?: string | undefined | null;
  shortId?: string | undefined | null;

  // Optional
  isVisible?: boolean;
  theme?: 'light' | 'dark';  // Styled variant only
  children?: React.ReactNode;
}

Entity Identification

Same as threaded comments — provide ONE of:
  • entity - Full Entity object
  • entityId - Replyke entity ID
  • foreignId - Foreign item ID
  • shortId - Short human-readable ID (from Replyke entity)

Minimal Example

<SocialCommentSection
  foreignId="photo_123"
/>

With Dark Mode

Inline Styles:
<SocialCommentSection
  foreignId="photo_123"
  theme={isDark ? 'dark' : 'light'}
/>
Tailwind:
<html className={isDark ? 'dark' : ''}>
  <SocialCommentSection foreignId="photo_123" />
</html>

Next Steps