[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MFJZ5ME3SBMTWW943QVMST":3,"skill-same:01M6MFJZ5ME3SBMTWW943QVMST":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":71,"ownerDescription":72,"updatedAt":73,"install":74,"resources":87},"01M6MFJZ5ME3SBMTWW943QVMST","cometchat-react-v7-customization",null,"Theme and brand the React v7 UI Kit — light\u002Fdark mode, CSS custom-property design tokens, per-component style overrides. Triggers: 'change chat colors', 'dark mode chat', 'match my brand', 'customize cometchat theme', 'override message list styles'.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-customization\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"cometchat react v7 customization","customization","react","cometchat","dark","triggers","tokens","theme","brand","ui","css-variables","my","list","verified","message","component","change","Variables","kit","design","mode","css","2026-11-10 10:12:30",false,"---\nname: cometchat-react-v7-customization\ndescription: \"Theme and brand the React v7 UI Kit — light\u002Fdark mode, CSS custom-property design tokens, per-component style overrides. Triggers: 'change chat colors', 'dark mode chat', 'match my brand', 'customize cometchat theme', 'override message list styles'.\"\nlicense: \"MIT\"\ncompatibility: \"React >=18; @cometchat\u002Fchat-uikit-react ^7 (7.2.x, verified 7.2.4)\"\nmetadata:\n  author: \"CometChat\"\n  version: \"1.0.0\"\n  tags: \"cometchat react customization theming css-variables v7\"\n---\n\n> **Ground truth:** `@cometchat\u002Fchat-uikit-react@7`. Theming mechanism below is from the live v7 theming docs (see core `references\u002Fdocs-map.md` → `\u002Fui-kit\u002Freact\u002Ftheming`). Status: **catalog-verified vs installed 7.1.0 (exports-only web-v7.json).** Fetch the full `--cometchat-*` token list from the theming **`.md` twin** (`{DOCS_BASE}\u002Fui-kit\u002Freact\u002Ftheming.md`, via `docs-map.md`) — do NOT bake it.\n\n## Companion skills (read first)\n- `cometchat-react-v7-core` — install, provider, `init→login→render`. This skill ASSUMES it.\n\n## Use this skill when\nBranding\u002Ftheming: colors, fonts, light\u002Fdark mode, or per-component style overrides.\n\n**Cloning a named app, or mixing kit components with your own UI?** Measure the target's colors, type, spacing and radii into ONE token source, theme the kit from it, and style every custom component from the same tokens so kit and custom parts look like one design; host a kit component in your own dialog\u002Fpanel when only its placement differs. Flow: `cometchat-onboarding` → `references\u002Fclone-mode.md` (Design sync, build levels L0–L6).\n\n## Prerequisites & install\nCovered by core. No new package.\n\n## Customization mechanism (BAKED — v7)\n- **Design tokens = CSS custom properties**, all prefixed `--cometchat-*`, scoped to the `.cometchat` wrapper.\n- **Light\u002Fdark:** built-in `light` (default) and `dark`, selected via the `theme` prop on `CometChatProvider` and the `data-theme` attribute on the wrapper. Runtime switching via the `useTheme` hook.\n- **Follow the OS theme:** the `theme` prop is `\"light\" | \"dark\"` only and defaults to `light` — there is **no `theme=\"system\"`** and the kit does NOT read `prefers-color-scheme` (AUDIT-004). To follow the system light\u002Fdark setting, sync the `theme` prop to `window.matchMedia(\"(prefers-color-scheme: dark)\")` (with a `change` listener, SSR-guarded). Recommended as the default for a fresh integration. Full recipe: `cometchat-react-v7-core\u002Freferences\u002Ftheming.md`.\n- **Import order:** import your overrides AFTER the UI Kit styles (import UI Kit CSS ONCE at root).\n\n```tsx\nimport { CometChatProvider, useTheme } from \"@cometchat\u002Fchat-uikit-react\";\nimport \".\u002Fcometchat-overrides.css\";   \u002F\u002F AFTER the kit styles\n\n\u003CCometChatProvider theme=\"dark\">\u003C>{\u002F* your chat UI *\u002F}\u003C\u002F>\u003C\u002FCometChatProvider>\n```\n```css\n.cometchat { --cometchat-font-family: \"Inter\", sans-serif; }             \u002F* theme-INDEPENDENT tokens only *\u002F\n.cometchat[data-theme=\"light\"] { --cometchat-primary-color: #e91e63; }   \u002F* per-theme COLOURS → data-theme attr *\u002F\n.cometchat[data-theme=\"dark\"]  { --cometchat-primary-color: #bb86fc; }\n.cometchat-message-list { \u002F* BEM class to scope tokens per component *\u002F }\n```\n> **Per-theme COLOURS go on the `data-theme` element — NOT the bare `.cometchat` class (AUDIT-033).** `CometChatProvider` renders one wrapper `\u003Cdiv data-theme=\"light|dark\" class=\"cometchat\">` (compiled bundle: `jsx(\"div\",{ \"data-theme\": internalTheme, className: \"cometchat\" })`), and the kit defines its tokens on `[data-theme=light]` \u002F `[data-theme=dark]`. **But several components render their OWN nested `\u003Cdiv class=\"cometchat ...\">` with NO `data-theme`** — verified for `CometChatSearch` (also popovers \u002F portaled surfaces). So a colour on the bare `.cometchat` class ALSO lands on that nested wrapper and **re-pins the base (light) value there**: in dark mode the search stays light while everything else goes dark. Scope per-theme colours to `.cometchat[data-theme=\"light\"]` \u002F `.cometchat[data-theme=\"dark\"]` so the nested wrapper matches neither and **inherits** the provider's theme. Keep only theme-independent tokens (font-family, radii) on bare `.cometchat`. (Earlier docs claimed `[data-theme=\"dark\"] .cometchat` matches nothing — that's wrong: it DOES match those nested wrappers. It's still not the right selector for brand tokens; use the `.cometchat[data-theme]` form above.) To retint a kit INTERNAL per theme, use the kit's own pattern — `[data-theme=\"dark\"] .cometchat-message-list { ... }`.\n\n## What's swappable\n- Global tokens on `.cometchat` (primary color, fonts, radii, spacing — fetch the full token names from the theming `.md` twin).\n- Per-theme overrides via `[data-theme=\"...\"]`.\n- Per-component scoping via BEM classes (`.cometchat-conversations`, `.cometchat-message-list`, ...).\n- Exact token names\u002Fdefaults: fetch the theming `.md` twin (`{DOCS_BASE}\u002Fui-kit\u002Freact\u002Ftheming.md`, via core `references\u002Fdocs-map.md`) — do NOT bake the token table.\n\n### Differentiating a nested surface — an opaque sub-surface needs its OWN var override (BAKED — verified vs 7.1.0)\n**Rule (general).** A kit sub-surface that paints an OPAQUE background does NOT inherit a wrapper's background — its own opaque paint covers whatever the wrapper set. To differentiate a nested surface you MUST override THAT surface's own background CSS variable (scoped on an ancestor — it cascades into the variable, no internal-class override needed), not just set a background on the wrapper.\n\n**The thread panel is the canonical case.** Verified in the 7.1.0 CSS: `.cometchat-message-list` paints `background: var(--cometchat-message-list-bg)` (default `var(--cometchat-background-color-03)`); `.cometchat-thread-header` and `.cometchat-message-composer` paint their own opaque `var(--cometchat-background-color-01)`. So the thread's message list renders `-03` — the SAME shade as the main list, and different from its own header\u002Fcomposer — and a background on the thread wrapper alone can't fix it (the list covers it). **Override the list's own token on the thread wrapper:**\n```css\n\u002F* the div you wrap CometChatThreadHeader + thread CometChatMessageList + CometChatMessageComposer in *\u002F\n.cc-thread-panel {\n  --cometchat-message-list-bg: var(--cometchat-background-color-01); \u002F* matches the thread header\u002Fcomposer; differs from the main list's -03 *\u002F\n  border-left: 1px solid var(--cometchat-border-color-default, #e8e8e8); \u002F* optional divider from the main pane (-default = neutral-300 = #e8e8e8 light \u002F #383838 dark) *\u002F\n}\n```\n`--cometchat-background-color-01` is `#ffffff` (light) \u002F `#141414` (dark) and `-03` is `#f5f5f5` (light) \u002F `#272727` (dark) — so the override visibly separates the thread list from the main list in BOTH themes while matching the thread header\u002Fcomposer. Same trick for any per-surface background: scope the surface's OWN token on the wrapper, never override the kit's internal `.cometchat-*` element classes (`core\u002Freferences\u002Fanti-patterns.md` #7\u002F#12\u002F#16).\n\n> **Tinting the thread HEADER specifically — use its dedicated token.** `.cometchat-thread-header` paints `background: var(--cometchat-thread-header-background, var(--cometchat-background-color-01, #fff))` (verified vs 7.1.0 — `dist\u002Findex.css:12727`; the token is NOT defined in `:root`, only referenced with that fallback chain). So if you want to give the thread HEADER its own tint (a different shade from the list\u002Fcomposer, e.g. a subtly darker panel header), set `--cometchat-thread-header-background` directly on the thread wrapper — cleaner and more targeted than leaning on the `-01` fallback:\n> ```css\n> .cc-thread-panel {\n>   --cometchat-message-list-bg: var(--cometchat-background-color-01);  \u002F* REQUIRED — repaints the thread LIST (opaque, covers the wrapper) *\u002F\n>   --cometchat-thread-header-background: var(--cometchat-background-color-02);  \u002F* OPTIONAL — tints ONLY the thread header, independent of the list *\u002F\n> }\n> ```\n> The `--cometchat-message-list-bg` override above is still **required** — the header token only paints the header; it does not touch the opaque message list. Use `--cometchat-thread-header-background` only when you want the header a *different* shade from the list; if you want them to match, the header already inherits `-01` and needs no override.\n\n### Avatar and sender name on every message (BAKED — 7.2.4 source; plugin path run live in a 1:1 chat)\nWhat to check and why: `cometchat-onboarding\u002Freferences\u002Fclone-mode.md` → *Message chrome*. This is the React how-to.\n**Kit default:** avatar and sender name only on INCOMING messages in a GROUP (7.2.4: `shouldShowAvatar = isIncoming && group != null && !hideAvatar`, with `isIncoming = alignment === \"left\"`). Your own messages and every 1:1 chat get none.\n- **Groups \u002F channels: `messageAlignment={CometChatMessageListAlignment.left}`** (`0`) on `CometChatMessageList`. The kit decides \"incoming\" from the alignment, so with everything on the left your own messages also get the avatar and name in groups. One prop, no plugin.\n- **1:1 chats and your own messages: wrap the default plugins. Do this yourself whenever the target shows avatars\u002Fnames in DMs; the alignment prop alone can't.** A plugin's `renderLeadingView` \u002F `renderHeaderView` replace the avatar and name slot for every message it handles, own or not, 1:1 or group. `CometChatProvider` puts your `plugins` BEFORE `defaultPlugins` and the first match wins, so a wrapped copy overrides the default:\n```tsx\nimport type { BaseMessage } from \"@cometchat\u002Fchat-sdk-javascript\";\nimport { CometChatAvatar, defaultPlugins, type CometChatMessagePlugin } from \"@cometchat\u002Fchat-uikit-react\";\n\nconst senderAvatar = (m: BaseMessage) => (\n  \u003CCometChatAvatar.Root name={m.getSender().getName()} image={m.getSender().getAvatar()} size=\"medium\">\n    \u003CCometChatAvatar.Image \u002F>\n    \u003CCometChatAvatar.Initials \u002F>\n  \u003C\u002FCometChatAvatar.Root>\n);\nconst isBatchTail = (pos?: string) => pos === \"middle\" || pos === \"last\"; \u002F\u002F multi-attachment batch: once\n\n\u002F\u002F Module scope: a new array on every render rebuilds the plugin registry.\nexport const senderPlugins: CometChatMessagePlugin[] = defaultPlugins\n  .filter((p) => p.messageCategories.includes(\"message\") || p.messageCategories.includes(\"custom\"))\n  .map((p) => ({\n    ...p,\n    renderLeadingView: (m, ctx) => (isBatchTail(ctx.batchPosition) ? null : senderAvatar(m)),\n    renderHeaderView: (m, ctx) => (isBatchTail(ctx.batchPosition) ? null : \u003Cspan className=\"cc-sender-name\">{m.getSender().getName()}\u003C\u002Fspan>),\n  }));\n\u002F\u002F \u003CCometChatProvider plugins={senderPlugins}> + \u003CCometChatMessageList messageAlignment={CometChatMessageListAlignment.left} \u002F>\n```\n  Action and call rows (category `action` \u002F `call`) are left out: they render centered with no avatar. Style `.cc-sender-name` from your token source (e.g. `font: 600 15px var(--cometchat-font-family)`); unstyled it falls back to the browser's serif font. Import `BaseMessage` as a named type, not `CometChat.BaseMessage` (strict TS6133).\n- **Once per run** isn't reachable: a plugin can't see the previous message (L4).\n\n## Structural customization — view slots & composition (beyond tokens)\nTheming changes how it LOOKS (tokens); changing WHAT renders is **view slots** + composition, not CSS. Every list\u002Fmessage component exposes view-slot props to inject custom UI **IN** the component (never as a sibling on top): e.g. Conversations `headerView` \u002F `searchView`; MessageHeader `trailingView` \u002F `auxiliaryButtonView`; MessageList `headerView` \u002F `footerView`; Composer `auxiliaryButtonView` \u002F `headerView`. Baked slot map: `cometchat-react-v7-core\u002Freferences\u002Fcomponent-props.md`. For the exhaustive per-component slot list, fetch the component's `.md` twin (`core\u002Freferences\u002Fdocs-map.md`) — do NOT read `.d.ts`. (Custom message **bubbles** are a separate capability — the message **plugin** architecture; see `cometchat-react-v7-features` + `COVERAGE.md`.)\n\n## Common pitfalls (BAKED)\n- Importing UI Kit CSS more than once, or overrides BEFORE the kit styles (specificity lost). Hardcoding hex in components instead of tokens. Assuming v6 theme classes — v7 uses `--cometchat-*` tokens + `data-theme`; fetch current names.\n- **Writing a per-theme override as `[data-theme=\"dark\"] .cometchat { ... }` — it matches NOTHING and silently no-ops.** The provider puts `data-theme` and `class=\"cometchat\"` on the SAME div, so there is no `.cometchat` nested inside a `[data-theme]` ancestor. Use `.cometchat[data-theme=\"dark\"]` (same element) for brand tokens, or `[data-theme=\"dark\"] .cometchat-\u003Cbem>` (ancestor + kit-internal descendant, the kit's own pattern) to retint an internal. (Verified vs 7.1.0.)\n- **Hand-write brand\u002Fper-theme overrides — do NOT put per-theme tokens (colors, background, font) on bare `:root` (AUDIT-049\u002F057).** A background or font pinned on `:root` has LOWER specificity than the kit's own `.cometchat[data-theme]` tokens, so it either loses (font silently doesn't apply) or forces the light value even in dark mode (breaks the OS-follow default, AUDIT-004\u002F033). Scope every per-theme token to `.cometchat[data-theme=\"light\"]` \u002F `.cometchat[data-theme=\"dark\"]` (theme-independent tokens like radii can stay on bare `.cometchat`). Theming is the SKILL's job — hand-write the scoped CSS (no generator does it).\n- **Setting a background on a WRAPPER to differentiate a nested surface, and expecting it to show.** An opaque kit sub-surface (the message list paints its own `--cometchat-message-list-bg`) covers the wrapper background — the wrapper bg only shows through non-opaque children. To differentiate the sub-surface, override THAT surface's own token (above), never the wrapper alone and never its internal `.cometchat-*` class. This is why the thread message-list keeps looking undifferentiated from the main list even after a thread-wrapper background is set (AUDIT-020\u002F024).\n- **A sent message's row remounts when it's confirmed (verified vs 7.2.4).** `CometChatMessageList` keys each row `String(msg.getId() || msg.getMuid())` and each date separator `date-${sentAt}`. The pending copy has no id and a local `sentAt`, so on success both the row and the \"Today\" separator unmount and mount again. Anything stateful in your custom bubble views (entrance animation, image load state, animated emoji) restarts and shows as a glitch. Key that state by `muid`, keep custom views free of first-render effects, and never animate or patch rows by watching the DOM. Check it by recording the last row's position and size from send to confirmed: only the status icon may change.\n- **Theming tokens alone leave kit-opened surfaces in kit style.** The thread header (`CometChatThreadHeader`), message information (from the hover toolbar), reactions list, emoji keyboard and context menu each need their own overrides. In a clone, either theme each one to the target, replace it, or hide the option that opens it (`hideMessageInfoOption`, ...), and open each one to check.\n- **Assuming the kit follows the OS theme — it doesn't.** `theme` defaults to `light` and there's no `theme=\"system\"`; a plain integration ignores the user's OS dark-mode setting. Sync to `prefers-color-scheme` if OS-follow is wanted (AUDIT-004).\n\n## Verify it works\nYour theme \u002F `--cometchat-*` overrides apply in the running app (colors, light\u002Fdark), and the kit CSS is imported once at the app root.\n\n**Close (after it builds):** end with the shared 3-option selectable menu and WAIT for the pick — **(1) add another feature** (suggest a few not-yet-wired) · **(2) customize theming** (further tweaks) · **(3) test it manually** (stop; let the user check). Tailor suggestions to what's not yet done. Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).\n","> **Ground truth:** `@cometchat\u002Fchat-uikit-react@7`. Theming mechanism below is from the live v7 theming docs (see core `references\u002Fdocs-map.md` → `\u002Fui-kit\u002Freact\u002Ftheming`). Status: **catalog-verified vs installed 7.1.0 (exports-only web-v7.json).** Fetch the full `--cometchat-*` token list from the theming **`.md` twin** (`{DOCS_BASE}\u002Fui-kit\u002Freact\u002Ftheming.md`, via `docs-map.md`) — do NOT bake it.\n\n## Companion skills (read first)\n- `cometchat-react-v7-core` — install, provider, `init→login→render`. This skill ASSUMES it.\n\n## Use this skill when\nBranding\u002Ftheming: colors, fonts, light\u002Fdark mode, or per-component style overrides.\n\n**Cloning a named app, or mixing kit components with your own UI?** Measure the target's colors, type, spacing and radii into ONE token source, theme the kit from it, and style every custom component from the same tokens so kit and custom parts look like one design; host a kit component in your own dialog\u002Fpanel when only its placement differs. Flow: `cometchat-onboarding` → `references\u002Fclone-mode.md` (Design sync, build levels L0–L6).\n\n## Prerequisites & install\nCovered by core. No new package.\n\n## Customization mechanism (BAKED — v7)\n- **Design tokens = CSS custom properties**, all prefixed `--cometchat-*`, scoped to the `.cometchat` wrapper.\n- **Light\u002Fdark:** built-in `light` (default) and `dark`, selected via the `theme` prop on `CometChatProvider` and the `data-theme` attribute on the wrapper. Runtime switching via the `useTheme` hook.\n- **Follow the OS theme:** the `theme` prop is `\"light\" | \"dark\"` only and defaults to `light` — there is **no `theme=\"system\"`** and the kit does NOT read `prefers-color-scheme` (AUDIT-004). To follow the system light\u002Fdark setting, sync the `theme` prop to `window.matchMedia(\"(prefers-color-scheme: dark)\")` (with a `change` listener, SSR-guarded). Recommended as the default for a fresh integration. Full recipe: `cometchat-react-v7-core\u002Freferences\u002Ftheming.md`.\n- **Import order:** import your overrides AFTER the UI Kit styles (import UI Kit CSS ONCE at root).\n\n```tsx\nimport { CometChatProvider, useTheme } from \"@cometchat\u002Fchat-uikit-react\";\nimport \".\u002Fcometchat-overrides.css\";   \u002F\u002F AFTER the kit styles\n\n\u003CCometChatProvider theme=\"dark\">\u003C>{\u002F* your chat UI *\u002F}\u003C\u002F>\u003C\u002FCometChatProvider>\n```\n```css\n.cometchat { --cometchat-font-family: \"Inter\", sans-serif; }             \u002F* theme-INDEPENDENT tokens only *\u002F\n.cometchat[data-theme=\"light\"] { --cometchat-primary-color: #e91e63; }   \u002F* per-theme COLOURS → data-theme attr *\u002F\n.cometchat[data-theme=\"dark\"]  { --cometchat-primary-color: #bb86fc; }\n.cometchat-message-list { \u002F* BEM class to scope tokens per component *\u002F }\n```\n> **Per-theme COLOURS go on the `data-theme` element — NOT the bare `.cometchat` class (AUDIT-033).** `CometChatProvider` renders one wrapper `\u003Cdiv data-theme=\"light|dark\" class=\"cometchat\">` (compiled bundle: `jsx(\"div\",{ \"data-theme\": internalTheme, className: \"cometchat\" })`), and the kit defines its tokens on `[data-theme=light]` \u002F `[data-theme=dark]`. **But several components render their OWN nested `\u003Cdiv class=\"cometchat ...\">` with NO `data-theme`** — verified for `CometChatSearch` (also popovers \u002F portaled surfaces). So a colour on the bare `.cometchat` class ALSO lands on that nested wrapper and **re-pins the base (light) value there**: in dark mode the search stays light while everything else goes dark. Scope per-theme colours to `.cometchat[data-theme=\"light\"]` \u002F `.cometchat[data-theme=\"dark\"]` so the nested wrapper matches neither and **inherits** the provider's theme. Keep only theme-independent tokens (font-family, radii) on bare `.cometchat`. (Earlier docs claimed `[data-theme=\"dark\"] .cometchat` matches nothing — that's wrong: it DOES match those nested wrappers. It's still not the right selector for brand tokens; use the `.cometchat[data-theme]` form above.) To retint a kit INTERNAL per theme, use the kit's own pattern — `[data-theme=\"dark\"] .cometchat-message-list { ... }`.\n\n## What's swappable\n- Global tokens on `.cometchat` (primary color, fonts, radii, spacing — fetch the full token names from the theming `.md` twin).\n- Per-theme overrides via `[data-theme=\"...\"]`.\n- Per-component scoping via BEM classes (`.cometchat-conversations`, `.cometchat-message-list`, ...).\n- Exact token names\u002Fdefaults: fetch the theming `.md` twin (`{DOCS_BASE}\u002Fui-kit\u002Freact\u002Ftheming.md`, via core `references\u002Fdocs-map.md`) — do NOT bake the token table.\n\n### Differentiating a nested surface — an opaque sub-surface needs its OWN var override (BAKED — verified vs 7.1.0)\n**Rule (general).** A kit sub-surface that paints an OPAQUE background does NOT inherit a wrapper's background — its own opaque paint covers whatever the wrapper set. To differentiate a nested surface you MUST override THAT surface's own background CSS variable (scoped on an ancestor — it cascades into the variable, no internal-class override needed), not just set a background on the wrapper.\n\n**The thread panel is the canonical case.** Verified in the 7.1.0 CSS: `.cometchat-message-list` paints `background: var(--cometchat-message-list-bg)` (default `var(--cometchat-background-color-03)`); `.cometchat-thread-header` and `.cometchat-message-composer` paint their own opaque `var(--cometchat-background-color-01)`. So the thread's message list renders `-03` — the SAME shade as the main list, and different from its own header\u002Fcomposer — and a background on the thread wrapper alone can't fix it (the list covers it). **Override the list's own token on the thread wrapper:**\n```css\n\u002F* the div you wrap CometChatThreadHeader + thread CometChatMessageList + CometChatMessageComposer in *\u002F\n.cc-thread-panel {\n  --cometchat-message-list-bg: var(--cometchat-background-color-01); \u002F* matches the thread header\u002Fcomposer; differs from the main list's -03 *\u002F\n  border-left: 1px solid var(--cometchat-border-color-default, #e8e8e8); \u002F* optional divider from the main pane (-default = neutral-300 = #e8e8e8 light \u002F #383838 dark) *\u002F\n}\n```\n`--cometchat-background-color-01` is `#ffffff` (light) \u002F `#141414` (dark) and `-03` is `#f5f5f5` (light) \u002F `#272727` (dark) — so the override visibly separates the thread list from the main list in BOTH themes while matching the thread header\u002Fcomposer. Same trick for any per-surface background: scope the surface's OWN token on the wrapper, never override the kit's internal `.cometchat-*` element classes (`core\u002Freferences\u002Fanti-patterns.md` #7\u002F#12\u002F#16).\n\n> **Tinting the thread HEADER specifically — use its dedicated token.** `.cometchat-thread-header` paints `background: var(--cometchat-thread-header-background, var(--cometchat-background-color-01, #fff))` (verified vs 7.1.0 — `dist\u002Findex.css:12727`; the token is NOT defined in `:root`, only referenced with that fallback chain). So if you want to give the thread HEADER its own tint (a different shade from the list\u002Fcomposer, e.g. a subtly darker panel header), set `--cometchat-thread-header-background` directly on the thread wrapper — cleaner and more targeted than leaning on the `-01` fallback:\n> ```css\n> .cc-thread-panel {\n>   --cometchat-message-list-bg: var(--cometchat-background-color-01);  \u002F* REQUIRED — repaints the thread LIST (opaque, covers the wrapper) *\u002F\n>   --cometchat-thread-header-background: var(--cometchat-background-color-02);  \u002F* OPTIONAL — tints ONLY the thread header, independent of the list *\u002F\n> }\n> ```\n> The `--cometchat-message-list-bg` override above is still **required** — the header token only paints the header; it does not touch the opaque message list. Use `--cometchat-thread-header-background` only when you want the header a *different* shade from the list; if you want them to match, the header already inherits `-01` and needs no override.\n\n### Avatar and sender name on every message (BAKED — 7.2.4 source; plugin path run live in a 1:1 chat)\nWhat to check and why: `cometchat-onboarding\u002Freferences\u002Fclone-mode.md` → *Message chrome*. This is the React how-to.\n**Kit default:** avatar and sender name only on INCOMING messages in a GROUP (7.2.4: `shouldShowAvatar = isIncoming && group != null && !hideAvatar`, with `isIncoming = alignment === \"left\"`). Your own messages and every 1:1 chat get none.\n- **Groups \u002F channels: `messageAlignment={CometChatMessageListAlignment.left}`** (`0`) on `CometChatMessageList`. The kit decides \"incoming\" from the alignment, so with everything on the left your own messages also get the avatar and name in groups. One prop, no plugin.\n- **1:1 chats and your own messages: wrap the default plugins. Do this yourself whenever the target shows avatars\u002Fnames in DMs; the alignment prop alone can't.** A plugin's `renderLeadingView` \u002F `renderHeaderView` replace the avatar and name slot for every message it handles, own or not, 1:1 or group. `CometChatProvider` puts your `plugins` BEFORE `defaultPlugins` and the first match wins, so a wrapped copy overrides the default:\n```tsx\nimport type { BaseMessage } from \"@cometchat\u002Fchat-sdk-javascript\";\nimport { CometChatAvatar, defaultPlugins, type CometChatMessagePlugin } from \"@cometchat\u002Fchat-uikit-react\";\n\nconst senderAvatar = (m: BaseMessage) => (\n  \u003CCometChatAvatar.Root name={m.getSender().getName()} image={m.getSender().getAvatar()} size=\"medium\">\n    \u003CCometChatAvatar.Image \u002F>\n    \u003CCometChatAvatar.Initials \u002F>\n  \u003C\u002FCometChatAvatar.Root>\n);\nconst isBatchTail = (pos?: string) => pos === \"middle\" || pos === \"last\"; \u002F\u002F multi-attachment batch: once\n\n\u002F\u002F Module scope: a new array on every render rebuilds the plugin registry.\nexport const senderPlugins: CometChatMessagePlugin[] = defaultPlugins\n  .filter((p) => p.messageCategories.includes(\"message\") || p.messageCategories.includes(\"custom\"))\n  .map((p) => ({\n    ...p,\n    renderLeadingView: (m, ctx) => (isBatchTail(ctx.batchPosition) ? null : senderAvatar(m)),\n    renderHeaderView: (m, ctx) => (isBatchTail(ctx.batchPosition) ? null : \u003Cspan className=\"cc-sender-name\">{m.getSender().getName()}\u003C\u002Fspan>),\n  }));\n\u002F\u002F \u003CCometChatProvider plugins={senderPlugins}> + \u003CCometChatMessageList messageAlignment={CometChatMessageListAlignment.left} \u002F>\n```\n  Action and call rows (category `action` \u002F `call`) are left out: they render centered with no avatar. Style `.cc-sender-name` from your token source (e.g. `font: 600 15px var(--cometchat-font-family)`); unstyled it falls back to the browser's serif font. Import `BaseMessage` as a named type, not `CometChat.BaseMessage` (strict TS6133).\n- **Once per run** isn't reachable: a plugin can't see the previous message (L4).\n\n## Structural customization — view slots & composition (beyond tokens)\nTheming changes how it LOOKS (tokens); changing WHAT renders is **view slots** + composition, not CSS. Every list\u002Fmessage component exposes view-slot props to inject custom UI **IN** the component (never as a sibling on top): e.g. Conversations `headerView` \u002F `searchView`; MessageHeader `trailingView` \u002F `auxiliaryButtonView`; MessageList `headerView` \u002F `footerView`; Composer `auxiliaryButtonView` \u002F `headerView`. Baked slot map: `cometchat-react-v7-core\u002Freferences\u002Fcomponent-props.md`. For the exhaustive per-component slot list, fetch the component's `.md` twin (`core\u002Freferences\u002Fdocs-map.md`) — do NOT read `.d.ts`. (Custom message **bubbles** are a separate capability — the message **plugin** architecture; see `cometchat-react-v7-features` + `COVERAGE.md`.)\n\n## Common pitfalls (BAKED)\n- Importing UI Kit CSS more than once, or overrides BEFORE the kit styles (specificity lost). Hardcoding hex in components instead of tokens. Assuming v6 theme classes — v7 uses `--cometchat-*` tokens + `data-theme`; fetch current names.\n- **Writing a per-theme override as `[data-theme=\"dark\"] .cometchat { ... }` — it matches NOTHING and silently no-ops.** The provider puts `data-theme` and `class=\"cometchat\"` on the SAME div, so there is no `.cometchat` nested inside a `[data-theme]` ancestor. Use `.cometchat[data-theme=\"dark\"]` (same element) for brand tokens, or `[data-theme=\"dark\"] .cometchat-\u003Cbem>` (ancestor + kit-internal descendant, the kit's own pattern) to retint an internal. (Verified vs 7.1.0.)\n- **Hand-write brand\u002Fper-theme overrides — do NOT put per-theme tokens (colors, background, font) on bare `:root` (AUDIT-049\u002F057).** A background or font pinned on `:root` has LOWER specificity than the kit's own `.cometchat[data-theme]` tokens, so it either loses (font silently doesn't apply) or forces the light value even in dark mode (breaks the OS-follow default, AUDIT-004\u002F033). Scope every per-theme token to `.cometchat[data-theme=\"light\"]` \u002F `.cometchat[data-theme=\"dark\"]` (theme-independent tokens like radii can stay on bare `.cometchat`). Theming is the SKILL's job — hand-write the scoped CSS (no generator does it).\n- **Setting a background on a WRAPPER to differentiate a nested surface, and expecting it to show.** An opaque kit sub-surface (the message list paints its own `--cometchat-message-list-bg`) covers the wrapper background — the wrapper bg only shows through non-opaque children. To differentiate the sub-surface, override THAT surface's own token (above), never the wrapper alone and never its internal `.cometchat-*` class. This is why the thread message-list keeps looking undifferentiated from the main list even after a thread-wrapper background is set (AUDIT-020\u002F024).\n- **A sent message's row remounts when it's confirmed (verified vs 7.2.4).** `CometChatMessageList` keys each row `String(msg.getId() || msg.getMuid())` and each date separator `date-${sentAt}`. The pending copy has no id and a local `sentAt`, so on success both the row and the \"Today\" separator unmount and mount again. Anything stateful in your custom bubble views (entrance animation, image load state, animated emoji) restarts and shows as a glitch. Key that state by `muid`, keep custom views free of first-render effects, and never animate or patch rows by watching the DOM. Check it by recording the last row's position and size from send to confirmed: only the status icon may change.\n- **Theming tokens alone leave kit-opened surfaces in kit style.** The thread header (`CometChatThreadHeader`), message information (from the hover toolbar), reactions list, emoji keyboard and context menu each need their own overrides. In a clone, either theme each one to the target, replace it, or hide the option that opens it (`hideMessageInfoOption`, ...), and open each one to check.\n- **Assuming the kit follows the OS theme — it doesn't.** `theme` defaults to `light` and there's no `theme=\"system\"`; a plain integration ignores the user's OS dark-mode setting. Sync to `prefers-color-scheme` if OS-follow is wanted (AUDIT-004).\n\n## Verify it works\nYour theme \u002F `--cometchat-*` overrides apply in the running app (colors, light\u002Fdark), and the kit CSS is imported once at the app root.\n\n**Close (after it builds):** end with the shared 3-option selectable menu and WAIT for the pick — **(1) add another feature** (suggest a few not-yet-wired) · **(2) customize theming** (further tweaks) · **(3) test it manually** (stop; let the user check). Tailor suggestions to what's not yet done. Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).\n",{"name":5,"license":15,"metadata":59,"description":7,"compatibility":63},{"tags":60,"author":61,"version":62},"cometchat react customization theming css-variables v7","CometChat","1.0.0","React >=18; @cometchat\u002Fchat-uikit-react ^7 (7.2.x, verified 7.2.4)","main","cebc3dce495d7eb80d3b1d5841f877a4a92e162d","plugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-customization",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":75,"prompt":85,"zipAvailable":86},[76,79,82],{"tool":77,"command":78},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-customization",{"tool":80,"command":81},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-customization",{"tool":83,"command":84},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-customization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-customization\u002FSKILL.md",true,[],[89,98,106,114,122,130],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":97},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":97},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":97},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":97},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":134,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":97},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]