Utility functions for Google Workspace card development.
npm install @googleworkspace/card-dev-assist
!NPM Downloads
!GitHub Issues or Pull Requests
!GitHub last commit
!GitHub License


A utility library for generating previews of Google card components. This package provides tools to render and visualize card cards, making it easier to develop and test Google Workspace Add-ons.
- Generate image previews of card cards
- Easy to integrate into testing and development workflows
- Helps ensure visual consistency and correctness of UI components
The primary function getScreenshot allows you to convert a card card object into a PNG image.
``typescript
import { getScreenshot } from "@googleworkspace/card-dev-assist";
const card = {
action: {
link: {
url: "https://www.example.com",
},
},
widgets: [
{
text: {
content: "Hello, world!",
},
},
],
};
const base64Data = await getScreenshot(card);
``