Galleria Component

UI Components for React
Post Reply
kevinquinn1918
Posts: 14
Joined: 26 Aug 2020, 14:14

26 Aug 2020, 14:26

I'm fairly new to React and to PrimeReact, and I can't seem to get the Galleria component to display images. The example uses

Code: Select all

import { PhotoService } from '../service/PhotoService';
. I don't have access to that, so I removed that and made an array of images that I'm trying to load. I'm not sure of what all the properties needed are. I put the image name in itemImageSrc, and used the thumbnailImageSrc and alt properties. The only thing I see are the reverse arrow and forward arrow. I think I may be missing some other modules. I'm using

Code: Select all

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import { Button } from 'primereact/button';
import { Galleria } from 'primereact/galleria';
import './GalleriaDemo.scss';
I got the carousel to work and other components. Is there a version of this, that I can use on CodePen to debug with a working version?

Thanks,
Kevin

kevinquinn1918
Posts: 14
Joined: 26 Aug 2020, 14:14

28 Aug 2020, 00:03

I got it to work. I don't know what I did wrong but I started over and it worked just fine.

One thing I'm finding though is that I don't see any documentation for the PhotoService class used in this component. I looked through and I found that each item needs an id, itemImageSrc, thumbnailImageSrc, alt and title.

Overall, the Galleria looks great, and I put 3 of them on the website I'm making for a client.

leroydakari
Posts: 1
Joined: 12 Sep 2020, 16:58

13 Sep 2020, 14:43

kevinquinn1918 wrote:
28 Aug 2020, 00:03
I got it to work. I don't know what I did wrong but I started over and it worked just fine.

One thing I'm finding though is that I don't see any documentation for the PhotoService class used in this component. I looked through and I found that each item needs an id, itemImageSrc, thumbnailImageSrc, alt and title.

Overall, the Galleria looks great, and I put 3 of them on the website I'm making for a client.
I had a similar problem with the Galleria, not working and just like you, I started over and managed to launch it.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 Oct 2020, 21:22

Hi,

Sorry for the delayed response. Could you please attach a codesandbox for us to replicate? Please see our data;
https://github.com/primefaces/primereac ... hotos.json
https://github.com/primefaces/primereac ... Service.js

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests