Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Card

Basic cards are designed to be concise, to present key (or summary) information to users, and to allow users to learn more if you choose (using a web link).

Use basic cards mainly for display purposes, as they have no interaction capabilities without a button. To link a button to the web, a surface must also have the WEB_LINK capability.

example
app.handle('Card', conv => {
  conv.add('This is a card.');
  conv.add(new Card({
    "title": "Card Title",
    "subtitle": "Card Subtitle",
    "text": "Card Content",
    "image": new Image({
      url: 'https://developers.google.com/assistant/assistant_96.png',
      alt: 'Google Assistant logo'
    })
  }));
});
see

Developer Documentation

Hierarchy

  • Card

Implements

Properties

Optional button

button: Link

Button. Optional.

Optional image

image: Image

A hero image for the card. The height is fixed to 192dp. Optional.

Optional imageFill

imageFill: Cropped | Gray | Unspecified | White

How the image background will be filled. Optional.

Optional subtitle

subtitle: string

Optional.

Optional text

text: string

Body text of the card. Supports a limited set of markdown syntax for formatting. Required, unless image is present.

Optional title

title: string

Overall title of the card. Optional.

Generated using TypeDoc