cometchat-astro-patterns

Integrate CometChat UI Kit v6 into Astro projects using React islands.

74|2|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-astro-patterns
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cometchat-astro-patterns
Source: https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-astro-patterns
Command: npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-astro-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns for integrating CometChat UI Kit v6 into Astro projects using React islands, covering client:only rendering, island communication, CSS handling, and common pitfalls.

Core Features & Use Cases

  • Patterns for client:only rendering with Astro islands
  • Island communication patterns across multiple islands
  • CSS handling guidance for client:only islands and CSS variable overrides
  • Common pitfalls and best practices for stable integrations

Quick Start

Follow these patterns to integrate CometChat into an Astro project using React islands with client:only rendering.

Frequently Asked Questions about cometchat-astro-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate CometChat UI Kit v6 into an Astro project using React islands?▼

To integrate CometChat UI Kit v6 into Astro, use React islands with client:only rendering, place directives correctly, import CSS inside islands, and wrap components with a provider to avoid hydration and CSS isolation issues.

Why does my CometChat React island fail to hydrate or lose CSS in Astro?▼

CometChat React islands fail hydration or lose CSS in Astro when client:only directives are misplaced or CSS is imported globally. Import CSS directly inside islands and wrap components with a provider to prevent these issues.

What is the best way to handle CSS isolation for client:only islands in Astro?▼

The best way to handle CSS isolation for client:only islands in Astro is to import CSS directly inside the React islands and override CSS variables locally, ensuring styles remain scoped and preventing leakage across components.

How do I enable island communication across multiple React islands in Astro?▼

To enable island communication across multiple React islands in Astro, wrap your components with a shared provider. This pattern ensures stable state synchronization and avoids common integration pitfalls during hydration.

Do I need client:only rendering for CometChat components in Astro?▼

You need client:only rendering for CometChat components in Astro because the UI Kit relies on browser APIs. Applying client:only directives correctly prevents server-side execution errors and ensures proper hydration.