How can i make an horizontal carousel in dialogflow?

When I try to create a carousel dynamically in dialogflow it appears vertically and with two items per row.

This is for a Google assistant application, the actions on Google documentation say that the carousel scrolls horizontally, but I can't make it happen.


    for (let i = 0; i < data_JSON.length; i++) {

      
      let name;
      let imageurl;
      let venue;

     
      name =  datosJSON[i].nombre_evento
      imageurl = datosJSON[i].nombre_imagen;
      venue = name;

      
      items[i] = {
        optionInfo: {
          key: (i + 1).toString(),
          synonyms: name,
        },
        description: "Imagen "+i,
        title: name,
        url: imageurl,
        image: new Image({
          url: imageurl,
          alt: venue
        }),
       
      }
      
    }
   
    var carrusel = new Carousel({
         title: 'Search Items ',
         items: items
    });

   conv.ask(carrusel);
  });

I expect in Google assistant only one row which I can scroll horizontally, but I have multiple rows with 2 items per row.

Upvotes: 0

Views: 285

Answers (1)

socasanta
socasanta

Reputation: 1561

Carousel displays horizontally on smart displays, but uses the 2xN grid on phones.

Upvotes: 2

Related Questions