Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Image

Image cards are designed to be a simpler alternative to a basic card that also contains an image. Use an image card when you want to present an image, and have no need for supporting text or interactive components.

example
app.handle('Image', conv => {
  conv.add("This is an image prompt!");
  conv.add(new Image({
      url: 'https://developers.google.com/assistant/assistant_96.png',
      alt: 'Google Assistant logo'
  }));
});
see

Developer Documentation

Hierarchy

  • Image

Implements

Properties

Properties

alt

alt: string

A text description of the image to be used for accessibility, e.g. screen readers. Required.

height

height: number

The height of the image in pixels. Optional.

url

url: string

The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example,https://www.agentx.com/logo.png. Required.

width

width: number

The width of the image in pixels. Optional.

Generated using TypeDoc