loading

Built-In Card Configuration

Cards have three properties: cardType, dataMappings and callsToAction.

ANSWERS.addComponent('VerticalResults', {
  container: '.vertical-results-container',
  card: {
    cardType: 'Standard',
    dataMappings: () => {},
    callsToAction: () => []
  }
  //other properties here
}

cardType

cardType accepts a string and defines which card type you’d like to use. There are three options: Standard, the Accordion and the Legacy.

dataMappings

The dataMappings option define how a card’s attributes, such as title and details, will be rendered. More information can be found in the Data Mapping section.

callsToAction

Calls to Action (CTAs) are the key actions of a result card. See Calls To Action for more information.