
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@cometchat/cards
Advanced tools
A vanilla TypeScript renderer for the CometChat Card Schema. Pass in card JSON, get back a native DOM element tree. Taps on interactive elements are emitted to your app through a single callback — the package never executes actions itself.
auto, light, and dark modes, with optional theme overridesCometChatCardActionEventsThe package is a pure renderer. It doesn't talk to the CometChat SDK, doesn't manage message lifecycle, and doesn't know about your app's routing. You decide what each action does.
npm install @cometchat/cards
import { renderCard } from "@cometchat/cards";
const { element, containerStyle, destroy } = renderCard({
cardJson,
themeMode: "auto",
onAction: (event) => {
console.log("action:", event.action.type, "from", event.elementId);
},
});
document.getElementById("card-root")!.appendChild(element);
// Later, when unmounting:
destroy();
The destroy function cleans up the system-theme media query listener used in auto mode.
For React projects, use @cometchat/cards-react which provides a CometChatCardView component that wraps this package.
Refer to the Integration Steps to integrate the cards into your app.
For integration issues, create a support ticket or seek real-time support via the CometChat Dashboard.
FAQs
CometChat Card Schema JSON renderer — vanilla TypeScript core
We found that @cometchat/cards demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.