ThumbnailCard class
Card builder class that simplifies building thumbnail cards.
- Extends
Constructors
Thumbnail |
Creates a new ThumbnailCard. |
Methods
buttons(ICard |
Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard. |
images(ICard |
Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download. |
subtitle(Text |
Subtitle appears just below Title field, differs from Title in font styling only. |
tap(ICard |
This action will be activated when user taps on the card. Not all channels support tap actions and some channels may choose to render the tap action as the titles link. |
text(Text |
Text field appears just below subtitle, differs from Subtitle in font styling only. |
title(Text |
Title of the Card. |
to |
Returns the JSON for the card |
Constructor Details
ThumbnailCard(Session)
Creates a new ThumbnailCard.
new ThumbnailCard(session?: Session)
Parameters
- session
- Session
(Optional) will be used to localize any text.
Method Details
buttons(ICardAction[] | IIsCardAction[])
Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard.
function buttons(list: ICardAction[] | IIsCardAction[])
Parameters
- list
-
ICardAction[] | IIsCardAction[]
Returns
images(ICardImage[] | IIsCardImage[])
Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download.
function images(list: ICardImage[] | IIsCardImage[])
Parameters
- list
-
ICardImage[] | IIsCardImage[]
Returns
subtitle(TextType, any[])
Subtitle appears just below Title field, differs from Title in font styling only.
function subtitle(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]
Returns
tap(ICardAction | IIsCardAction)
This action will be activated when user taps on the card. Not all channels support tap actions and some channels may choose to render the tap action as the titles link.
function tap(action: ICardAction | IIsCardAction)
Parameters
- action
Returns
text(TextType, any[])
Text field appears just below subtitle, differs from Subtitle in font styling only.
function text(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]
Returns
title(TextType, any[])
Title of the Card.
function title(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]