Git Product home page Git Product logo

fslightbox-react's Introduction

React Fullscreen Lightbox Basic

Description

A React component for displaying images, videos, or, through custom sources, anything you want in a clean overlying box. The project's website: https://fslightbox.com.

Dependency Version
react at least 16.8.0
react-dom at least 16.8.0

Installation

Through a package manager

npm install fslightbox-react

Or, through an archive downloaded from the website

The .tgz archive, in its entirety, should be put somewhere in the end project, for example, "./src/lib". Then run the package manager's install command with the path to that archive. The command have to be run from the directory where your project's "package.json" file is.

$ npm install ./src/lib/[lightbox archive name] 

For example:

$ npm install ./src/lib/fslightbox-react-1.0.0.tgz

Basic usage

import React, { useState } from "react";
import FsLightbox from "fslightbox-react";

function App() {
	// To open the lightbox change the value of the "toggler" prop.
	const [toggler, setToggler] = useState(false);

	return (
		<>
			<button onClick={() => setToggler(!toggler)}>
				Open the lightbox.
			</button>
			<FsLightbox
				toggler={toggler}
				sources={[
					'https://i.imgur.com/fsyrScY.jpg',
					'https://www.youtube.com/watch?v=xshEZzpS4CQ',
					'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
				]}
			/>
		</>
	);
}

export default App;

Documentation

Available at: https://fslightbox.com/react/documentation.

Demo

Available at: https://fslightbox.com/react/demo.

Browser Compatibility

Browser Works?
Chrome Yes
Firefox Yes
Safari Yes
Edge Yes
IE 11 Yes

fslightbox-react's People

Contributors

banthagroup avatar binomialstew avatar dependabot[bot] avatar hypnosphi avatar kokatsuna avatar piotrzdziarski avatar stasinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fslightbox-react's Issues

Slide number container too small to fit large numbers

Summary

The slide-number-container width is too small to fit large numbers.

Expected Behavior

When displaying a large number of images, the counter should remain in its top left position, expending its width to the right.

Actual Behavior

A max width of 55px is currently set on the container. Resulting in this behavior, where the number '354' is cut off at the left side:
Schermafbeelding 2019-12-26 om 15 29 50

Possible fixes

Position the slide-number-container with an absolute position, just like the toolbar.

Remounting with lightbox open crashes (null is not an object (evaluating 'e.current.classList'))

Hi!

Thanks for this amazing lightbox.

I'm using Sentry for error logging in the live environment and am receiving an alarming number of crashes due to FSLightbox.

My FSLightbox implementation uses strictly images (image URLs).

const carouselImages = images.map(img => img.url);

...

<FsLightbox
  toggler={lightboxOpen}
  type="image"
  sources={carouselImages}
  slide={selectedImageIndex}
  disableLocalStorage
/>

The crash is reported as follows:

TypeError
null is not an object (evaluating 'e.current.classList')

[1]
{snip} h(k.a.createRef());return t}function F(e,t){var n=e.current.classList;n.contains(t)&&n.remove(t)}var B=250;function U(e){var t=this,n=e.comp {snip}

[2]
{snip} ==innerHeight&&o.set(!1);for(var e=0;e<i.sourcesCount;e++)F(l[e],u),e!==d.current&&n[e].negative(),r[e]&&c[e].current&&r[e].styleSize()}}(e) {snip}

Additional data about event:

[
  {
    currentTarget: [object Window],
    isTrusted: [Circular ~],
    target: [object Window],
    type: resize
  }
]

It has been reported a total of 219 times with the following browser stats:

% ย  Last Seen
39.73% Chrome Mobile 78.0.3904 3 days ago
30.14% Chrome 78.0.3904 a day ago
11.42% Mobile Safari 13.0.1 21 hours ago
9.13% Mobile Safari 10.0 4 days ago
5.48% Samsung Internet 10.2 3 days ago
4.11% Samsung Internet 10.1 7 days ago

Update about reproducablity:

I found a way to reproduce it, so it might be an issue with the way I implement FsLightbox. I use it in a single-page app e-commerce project and FsLightbox is used to display product images.

It basically happens when the user navigates back using browser's back functionality when the FsLightbox is open. As it's a single page app and react router intercepts the back press, it just causes a re-render, but it does not completely re-render the FsLightbox - instead, it just changes the sources prop. This causes the scroll to still be blocked and throws the described error(s) when the window is resized. The scroll can be fixed by re-opening and closing the lightbox, but the classList errors persist.

See video: https://d.pr/v/mIw57V

I think I can fix it by forcing the lightbox to close on route change. Is it something you will consider handling as well? I believe the only way to detect this on the FsLightbox side is when the sources changes completely.

Updates about fixing:

Also tried setting the key prop, but it did not solve the described issue. It didn't seem to re-mount the FsLightbox component.

Even tried forcing a re-render using state:

const [fsLightboxRender, setFsLightboxRender] = useState(false);

useEffect(() => {
    setFsLightboxRender(false);
    setTimeout(() => setFsLightboxRender(true), 0);
  }, [product.id]);

...

{fsLightboxRender && (
  <FsLightbox
    toggler={lightboxOpen}
    type="image"
    sources={carouselImages}
    slide={selectedImageIndex}
    disableLocalStorage
    key={product.id}
  />
)}

It didn't work. :(

I think it boils down to remounting the component while the lightbox is open not working as intended?

onUpdate event

Is it possible to trigger an event when using the lightbox pagination?

I have tried onOpen and onInit, but neither has provided the desired effect.

FSlightbox when opening first time throws: Cannot read property 'zero' of undefined

I have this React component that renders the Lightbox when clicking on an image from gallery page. And seems to work fine overall, but I found a weird behavior, when I clean all my application site data and go the frist time on the gallery page and click an image I get the next error:

error: uncaughtException: Cannot read property 'zero' of undefined
TypeError: Cannot read property 'zero' of undefined

react-hot-loader.development.js:294 TypeError: Cannot read property 'zero' of undefined
at t.r.runActions (pathToProject/node_modules/fslightbox-react/index.js:1)
at callCallback (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:12490)
at commitUpdateQueue (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:12511)
at commitLifeCycles (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:19858)
at commitLayoutEffects (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:22803)
at HTMLUnknownElement.callCallback (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:237)
at invokeGuardedCallback (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:292)
at commitRootImpl (pathToProject/node_modules/react-dom/cjs/react-dom.development.js:22541)
at unstable_runWithPriority (pathToProject/node_modules/scheduler/cjs/scheduler.development.js:653)

Here is my react component:

const Lightbox = () => {
  const dispatch = useDispatch();
  const { items } = useSelector(state => state.items);
  const { lightboxDialog } = useSelector(state => state.window);
  const sources =
    items?.length > 0 ? items.map(item => item.original) : []; // creates an array of strings with url sources to the images

  return (
      <FsLightbox
        toggler={lightboxDialog?.toggler}
        sources={sources}
        slide={lightboxDialog.slide}
      />
  );
};

Has anyone had this problem before? How do I fix it since even the stack-trace is pretty hard to follow

Question: How to start the lightbox already opened?

Thanks a lot for your library, but I am wondering how I can add it to a page and use a parameter to open it with a specific index when the page is loaded? Couldnt find anything in the docs or stackoverflow. You got any idea or is that not possible?

Disable image scaling

Hello.

Thank you guys for this library, it's really good.

I need to disable the scaling of the image to handle image dimensions outside fslightbox-react.

I've tried removing the transform: scale() bit from the style that is added, but the translate() is removed as well and the slides appear on top of each other, as this value is calculated according to the current slide.

How can the scaling be disabled? Is there any workaround to the slides on top of each other issue?

Config option for "thumbs"?

Hi Piotr (...or Peter?!)

Thank you for making such a slick ReactJS lightbox solution. I think it's the best one right now.

I have a question. I see that on your project webiste there are image thumbs, however I don't see a configuration option for this. Is there an undocumented way to display them?

Screen Shot 2019-06-14 at 2 36 28 PM

Can not install on mac

It seems like the plugin does not support MacOS?

I tried installing it through NPM and received the following error:

npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"}) npm ERR! notsup Valid OS: linux npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: darwin npm ERR! notsup Actual Arch: x64

How to deal with AJAX errors

This is a question that may having more to do with the base https://github.com/banthagroup/fslightbox, but I have not been able to find a clear example of dealing with AJAX requests in the documentation.

The issue I'm seeing specifically is a 404 while loading an image. In my case, this is expected every so often, but it results in an infinite spinner which isn't the experience I'd like, since it doesn't communicate the network request has finished.

Is the only solution in this case to make a custom source?

Thanks for your work on this project!

Stop Videos on slide change

This is an amazing lightbox, so thank you for that!

Is there a way to stop the videos from playing when I change the slide? If I start playing one video and then go to the next one, and play it, I can hear both videos playing. I added the loadOnlyCurrentSource and for some reason it worked last night, but I guess it was only a fluke, because today it has the default behavior, and I can see the same thing happening in the pro demo version.

Thanks!

Lazy load pictures

When the lightbox is opened, all the pictures are loaded at the same time.
I don't know which order is choosen to load the pictures, but when it seems that you have to wait all the pictures to be loaded to see the first one.

The best behaviour should be:

  • Load the picture to show and start loading the others in "background"
  • When we move to another picture, if the new current is loaded, show it, if it's not, show the loader
  • Load them in the right order

I don't know how it can be done, but it would be great.
Moreover, it would be awesome to have a way to set smaller images to load before, for progressive pictures loading (a.k.a medium loading).
There is a good component made with react for Progressive image loading: https://www.npmjs.com/package/react-progressive-image-loading

Thanks for the great work.
I'm waiting for the pro version btw ๐Ÿ˜ƒ

Making "slide" start at 0 (not 1)

Can you make slide start at 0 instead of 1?

<FsLightbox
  toggler={ fn }
  slide={0} //<----- first image
  urls={[
    'images/first.jpg',
    'videos/second.mp4',
    'https://www.youtube.com/watch?v=xshEZzpS4CQ',
  ]}
/> 

This makes more sense because it's how arrays work.

Pinch to zoom causes issues on mobile

Expected behavior

On mobile, I expected to be able to pinch an image to zoom in, pan around, and pinch to zoom back out to default size.

Actual behavior

  • Pinching to zoom doesn't zoom.
  • It can cause unexpected behavior like swiping images or more than one image being displayed.

A good example of pinch to zoom functionality

https://photoswipe.com/#&gid=1&pid=1

How to reproduce

I tried this on mobile using both fslightbox and fslightbox pro by visiting fslightbox.com on a mobile phone.

Custom sources does not work with functional components: Uncaught TypeError: Cannot read property 'classList' of null

Hi,

Thanks for working on a great library.

However, im having trouble using latest version and custom sources.

As soon as i display my lightbox it crashes with the following error message:

Uncaught TypeError: Cannot read property 'classList' of null
    at ae.runNormalLoadActions (index.js:561)
    at ae.runInitialLoadActions (index.js:563)
    at handleLoad (index.js:604)
    at commitHookEffectList (react-dom.development.js:21100)
    at commitPassiveHookEffects (react-dom.development.js:21133)
    at HTMLUnknownElement.callCallback (react-dom.development.js:363)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:412)
    at invokeGuardedCallback (react-dom.development.js:466)
    at flushPassiveEffectsImpl (react-dom.development.js:24223)
    at unstable_runWithPriority (scheduler.development.js:676)
    at runWithPriority$2 (react-dom.development.js:11855)
    at flushPassiveEffects (react-dom.development.js:24194)
    at react-dom.development.js:23755
    at scheduler_flushTaskAtPriority_Normal (scheduler.development.js:451)
    at flushTask (scheduler.development.js:504)
    at flushWork (scheduler.development.js:637)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:238)

I'm using version 1.4 and this is my lightbox props:

<FsLightbox
        toggler={lightboxState.toggle}
        sourceIndex={lightboxState.index}
        customSources={previewItems.preview.map((src, i) => (
          <BlobImage fallback={whiteSpinner} key={i} src={src} />
        ))}
        customSourcesGlobalMaxDimensions={{ width: 1920, height: 1080 }}
      />

EDIT: I also get this error message:
index.js:1437 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Works fine when using a normal dom node as custom source. Seems like there is a problem when using refs on components :)

fslightbox did not update new source

I'm using fslightbox for product gallery. After update productdetail state, new images are updated, but when click to show lightbox, it shows images of first product, not new update image.
Here is the code:

<div className="product-image">
  {productdetail.images.map((image, index) => (
    <a key={index} href="#" onClick={ () => this.openLightboxOnSource(image) }>
      <img src={image} alt="" />
    </a>
  ))}
  <FsLightbox
    toggler={ this.state.toggler }
    slide={ this.state.slide }
    sources={ productdetail.images }
    disableLocalStorage={true}
  />
</div>

Multiple Rows for Mobile

Hello!

I'm currently working on a website and works with the responsiveLayout and I was wondering if it will be possible to actually have multiple rows on mobile?

On desktop
image

We would like the same on mobile and we tried to write this:

      <CarouselContainer>
        <Carousel
          cols={3}
          rows={2}
          gap={20}
          arrowLeft={<CarouselArrow left src={Arrow} alt="Previous" />}
          arrowRight={<CarouselArrow src={Arrow} alt="Next" />}
          containerStyle={{ background: "transparent" }}
          responsiveLayout={[
            {
              breakpoint: 1200,
              cols: 2,
              rows: 2
            },
            {
              breakpoint: 990,
              cols: 2,
              rows: 2
            }
          ]}
          mobileBreakpoint={670}
        >
          {[...Array(10)].map((_, i) => (
            <Carousel.Item key={i}>
              <CalendarItem onClick={() => openLightboxOnSlide(i + 1)}>
                {i}
              </CalendarItem>
            </Carousel.Item>
          ))}
        </Carousel>
      </CarouselContainer>

But doesn't seems to work. We also bought the PRO Version, if this is only available on the PRO.

Thanks!

No video thubmnail for iOS safari

It seems safari doesn't allow for video thumbnails in this case from what I have read.
The only way to display it seems to be the poster attribute, where a thumbnail image could be loaded.
In my opinion the ability to add this attribute to a video tag should be added, or a better still a custom video attribute should be allowed.

Can't input multiple arrays to source

Hi, I'm trying to input multiple arrays to show images conditionally.
However, it only shows the first or last image array.

// images = {human: ['adam', 'bill', 'chris'], animal: ['bear', 'horse', 'lion']}

    <FsLightbox
        toggler={toggler}
        sources={filter === human ? images.human : images. animal}
        type='image'
                />

Fill for toolbar buttons

Right now to change the fill color for a specific icon the workaround is to do something like this:

.fslightbox-toolbar-button:nth-child(1) {
    .fslightbox-svg-path {
        fill: blue;
    }
}

However, it could be easier setting this with the customToolbarButtons prop or the svg prop, either setting fill directly from these parsed over objects, or better yet, setting the classnames of each toolbar button / svg.

    {
        viewBox: '0 0 512 512',
        d: THUMBS_UP_PATH,
        width: '17px',
        height: '17px',
        title: 'Thumbs Up',
        // 1
        style: { fill: 'blue' },
        // 2
        fill: 'blue',
        // 3
        className: 'blue',
        onClick: () => console.log('Thumbs Up clicked!'),
    },

[Pro 1.3.0] Issue with thumbnail width

The width of thumbnails is being adjusted so that they all fit on the screen at once. I think the expected behavior is for them to stay the same width, and if the screen gets too small to display them all, they can be scrolled with touch. That seems to be how it works on the demo on the website.

This is happening even with the most basic options set:
<FsLightbox toggler={toggleLightbox} sources={media.map((m) => m.url)} />

thumbs

It happens with a small amount of items too.
Window wide enough for them to have their full width:
thumbs2
Window made as small as possible, thumbs are squished into the space:
thumbs3

[PRO] isOpen State does not update properly

Hey,

I'm doing a component with the FSLightbox but it looks like the isOpen state doesn't update to hide the Lightbox.
I need click on close twice.

The parent component

import React, { useState } from "react"
import styled from "styled-components"
import { useStaticQuery, graphql } from "gatsby"
import { FormattedMessage } from "gatsby-plugin-intl"
import Img from "gatsby-image"
import { BrowserView } from "react-device-detect"

import ParralaxDesk from "../components/ParralaxDesktop"
import SectionMaster from "./sections/SectionsMaster"
import Lightbox from "../components/Lighbox"

import {
  Title,
  Paragraph,
  TextContainer,
  layers,
  CTA
} from "../components/helpers"

const LandingKV = styled.div`
  position: fixed;
  width: 280px;
  top: 100px;
  left: 50%;
  margin-left: -140px;
  opacity: ${props => (props.isVisible ? 1 : 0)};
  transition: opacity .3s ease-in;
  ${({ theme }) => theme.laptop`
      bottom: inherit;
      left: 75%;
      top: 50%;
      margin-left: 0;
      transform: translate(-50%, -50%);
      width: 500px;
  `}
`

const Landing = () => {
  const [isActive, setIsActive] = useState(true)
  const [isLightBoxOpen, setIsLightBoxOpen] = useState(false)
  const [lightBoxNumber, setlightBoxNumber] = useState(1)

  const openLightboxOnSlide = (number) => {
    setIsLightBoxOpen(true);
    setlightBoxNumber(number);
  }

  const data = useStaticQuery(graphql`
    query {
      kv: file(relativePath: { eq: "landing/kv.png" }) {
        childImageSharp {
          fluid(maxWidth: 800, quality: 60) {
            ...GatsbyImageSharpFluid
          }
        }
      }
      rock1: file(relativePath: { eq: "background/rock1.png" }) {
        childImageSharp {
          fixed(width: 516) {
            ...GatsbyImageSharpFixed
          }
        }
      }
      foreground: file(relativePath: { eq: "background/foreground1.png" }) {
        childImageSharp {
          fixed(width: 1214) {
            ...GatsbyImageSharpFixed
          }
        }
      }
    }
  `)
  const sources = [data.kv.childImageSharp.fluid]
  return (
    <SectionMaster
      isActive={(e) => setIsActive(e)}
      theText={
        <TextContainer home>
          <Title>
            <FormattedMessage id="titleWelcome" values={{ br: <br /> }} />
          </Title>
          <Paragraph>
            <FormattedMessage id="textWelcome" values={{ br: <br /> }} />
          </Paragraph>
        </TextContainer>
      }
      theRest={
        <>
          <LandingKV isVisible={isActive}>
            <CTA onClick={() => openLightboxOnSlide(2)} bottom="-80px" left="50%" center flip>Watch</CTA>
            <Img fluid={sources} alt="" />
          </LandingKV>
          <Lightbox
            showLightBox={isLightBoxOpen}
            slideNumber={lightBoxNumber}
            isClosing={() => setIsLightBoxOpen(false)}
            sources={[
              "https://cdn.beams.co.jp/img/goods/58857366854/O/58857366854_C_7.jpg",
              "https://www.youtube.com/watch?v=xshEZzpS4CQ",
              "https://cdn.beams.co.jp/img/goods/58857366854/O/58857366854_C_7.jpg",
              "https://www.youtube.com/watch?v=xshEZzpS4CQ",
            ]}
            captions={[
              <>
              <h1>Textiles</h1>
              <h1>Lorem Ipsum</h1>
              <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nisi
                nibh, porta eu nisl nec, mattis dictum orci.
              </p>
              </>,
              <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nisi
                nibh, porta eu nisl nec, mattis dictum orci.
              </p>,
              <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nisi
                nibh, porta eu nisl nec, mattis dictum orci.
              </p>,
            ]}
          />
        </>
      }
    />
  )
}

export default Landing

The child

import FsLightbox from "fslightbox-react"
import React, { useState, useEffect } from "react"

export default function Lightbox(props) {
  const [lightboxController, setLightboxController] = useState({
    toggler: false,
    number: 0
  })

  useEffect(() => {
    setLightboxController({
      toggler: props.showLightBox,
      number: props.slideNumber
    })
    console.log('Props: ',props.showLightBox);
    console.log('Toggler: ',lightboxController.toggler);
  }, [props.showLightBox, props.slideNumber])

  return (
      <FsLightbox
        toggler={lightboxController.toggler}
        slide={lightboxController.number}
        sources={props.sources}
        captions={props.captions}
        onClose={() => props.isClosing()}
        svg={{
          toolbarButtons: {
            close: {
              d:
                "M7.34314575,3.10050506 L12.9998254,8.75682541 L18.6568542,3.10050506 C19.8284271,1.92893219 21.7279221,1.92893219 22.8994949,3.10050506 C24.0710678,4.27207794 24.0710678,6.17157288 22.8994949,7.34314575 L17.2418254,12.9998254 L22.8994949,18.6568542 C24.0710678,19.8284271 24.0710678,21.7279221 22.8994949,22.8994949 C21.7279221,24.0710678 19.8284271,24.0710678 18.6568542,22.8994949 L12.9998254,17.2418254 L7.34314575,22.8994949 C6.17157288,24.0710678 4.27207794,24.0710678 3.10050506,22.8994949 C1.92893219,21.7279221 1.92893219,19.8284271 3.10050506,18.6568542 L8.75682541,12.9998254 L3.10050506,7.34314575 C1.92893219,6.17157288 1.92893219,4.27207794 3.10050506,3.10050506 C4.27207794,1.92893219 6.17157288,1.92893219 7.34314575,3.10050506 Z",
            },
          },
          slideButtons: {
            previous: {
              width: "13px",
              height: "20px",
              d:
                "M10.8367585,2.57818637 L10.8549459,2.59637382 L10.8549459,2.59637382 C11.3470329,3.09877779 11.3470329,3.90244954 10.8549459,4.40485351 L5.15661713,10.2211227 L10.8549459,16.0387973 C11.3470329,16.5412013 11.3470329,17.344873 10.8549459,17.847277 C10.3758479,18.3364196 9.59093381,18.3445624 9.10179117,17.8654644 C9.09566596,17.859465 9.08960315,17.8534022 9.08360373,17.847277 L2.58868238,11.2161848 C2.31992718,10.9417949 2.19795366,10.5775417 2.22276183,10.2215835 C2.19795366,9.86610913 2.31992718,9.5018559 2.58868238,9.22746604 L9.08360373,2.59637382 C9.56270172,2.10723118 10.3476158,2.09908838 10.8367585,2.57818637 Z",
            },
            next: {
              width: "13px",
              height: "20px",
              d:
                "M4.34183713,2.57818637 L4.36002457,2.59637382 L4.36002457,2.59637382 L10.8549459,9.22746604 C11.1237011,9.5018559 11.2456746,9.86610913 11.2208665,10.2220673 C11.2456746,10.5775417 11.1237011,10.9417949 10.8549459,11.2161848 L4.36002457,17.847277 C3.88092658,18.3364196 3.09601247,18.3445624 2.60686983,17.8654644 L2.58868238,17.847277 L2.58868238,17.847277 C2.09659538,17.344873 2.09659538,16.5412013 2.58868238,16.0387973 L8.28561713,10.2211227 L2.58868238,4.40485351 C2.09659538,3.90244954 2.09659538,3.09877779 2.58868238,2.59637382 C3.06778037,2.10723118 3.85269449,2.09908838 4.34183713,2.57818637 Z",
            },
          },
        }}
      />
  )
}

To perfectly close the Lightbox I need to click 2 times on the close button as you can see in this video: https://cln.sh/tSUEBv

Do you have any idea??

Using the PRO version if this matter

Thank you!

[FR] Add support of PDF file in data sources

Feature Request:

It would be nice if you add support, I was working on project where i have image, video and pdf files to show when clicked, images and videos are working great, but pdf not quite even if i try custom data sources, iframe and many other things.

Incorrect image loads after navigating through lightbox view

This is specific to the react version and occurs on the demo on the fslightbox website as well.

To reproduce:

  • click on the first thumbnail to open the lightbox.
  • click next image button one or more times.
  • close the lightbox.
  • click on the first thumbnail again.

The image that loads this time will be the last image displayed in the lightbox. So, if you closed the lightbox on image 5, when clicking thumbnail 1, it will open the lightbox and show image 5 instead of image 1.

You can effectively reset this behaviour by clicking on another thumbnail at any point, then clicking the first thumbnail, which will result in the correct image being displayed in the lightbox.

Object(...) is not a function on open

I'm trying to use fslightbox-react in my project, but when I try to open it, the page become white and in console I get these errors:

index.js:1071 Uncaught TypeError: Object(...) is not a function
at Ce (index.js:1071)
at mountIndeterminateComponent (react-dom.development.js:13922)
at beginWork (react-dom.development.js:14376)
at performUnitOfWork (react-dom.development.js:16625)
at workLoop (react-dom.development.js:16665)
at HTMLUnknownElement.callCallback (react-dom.development.js:107)
at Object.invokeGuardedCallbackDev (react-dom.development.js:144)
at invokeGuardedCallback (react-dom.development.js:191)
at replayUnitOfWork (react-dom.development.js:16040)
at renderRoot (react-dom.development.js:16722)
at performWorkOnRoot (react-dom.development.js:17350)
at performWork (react-dom.development.js:17272)
at performSyncWork (react-dom.development.js:17245)
at interactiveUpdates$1 (react-dom.development.js:17526)
at interactiveUpdates (react-dom.development.js:2248)
at dispatchInteractiveEvent (react-dom.development.js:4747)
Ce @ index.js:1071
mountIndeterminateComponent @ react-dom.development.js:13922
beginWork @ react-dom.development.js:14376
performUnitOfWork @ react-dom.development.js:16625
workLoop @ react-dom.development.js:16665
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
replayUnitOfWork @ react-dom.development.js:16040
renderRoot @ react-dom.development.js:16722
performWorkOnRoot @ react-dom.development.js:17350
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:159 Uncaught TypeError: Object(...) is not a function
at F (index.js:159)
at mountIndeterminateComponent (react-dom.development.js:13922)
at beginWork (react-dom.development.js:14376)
at performUnitOfWork (react-dom.development.js:16625)
at workLoop (react-dom.development.js:16665)
at HTMLUnknownElement.callCallback (react-dom.development.js:107)
at Object.invokeGuardedCallbackDev (react-dom.development.js:144)
at invokeGuardedCallback (react-dom.development.js:191)
at replayUnitOfWork (react-dom.development.js:16040)
at renderRoot (react-dom.development.js:16722)
at performWorkOnRoot (react-dom.development.js:17350)
at performWork (react-dom.development.js:17272)
at performSyncWork (react-dom.development.js:17245)
at interactiveUpdates$1 (react-dom.development.js:17526)
at interactiveUpdates (react-dom.development.js:2248)
at dispatchInteractiveEvent (react-dom.development.js:4747)
F @ index.js:159
mountIndeterminateComponent @ react-dom.development.js:13922
beginWork @ react-dom.development.js:14376
performUnitOfWork @ react-dom.development.js:16625
workLoop @ react-dom.development.js:16665
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
replayUnitOfWork @ react-dom.development.js:16040
renderRoot @ react-dom.development.js:16722
performWorkOnRoot @ react-dom.development.js:17350
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:228 Uncaught TypeError: Object(...) is not a function
at N (index.js:228)
at mountIndeterminateComponent (react-dom.development.js:13922)
at beginWork (react-dom.development.js:14376)
at performUnitOfWork (react-dom.development.js:16625)
at workLoop (react-dom.development.js:16665)
at HTMLUnknownElement.callCallback (react-dom.development.js:107)
at Object.invokeGuardedCallbackDev (react-dom.development.js:144)
at invokeGuardedCallback (react-dom.development.js:191)
at replayUnitOfWork (react-dom.development.js:16040)
at renderRoot (react-dom.development.js:16722)
at performWorkOnRoot (react-dom.development.js:17350)
at performWork (react-dom.development.js:17272)
at performSyncWork (react-dom.development.js:17245)
at interactiveUpdates$1 (react-dom.development.js:17526)
at interactiveUpdates (react-dom.development.js:2248)
at dispatchInteractiveEvent (react-dom.development.js:4747)
N @ index.js:228
mountIndeterminateComponent @ react-dom.development.js:13922
beginWork @ react-dom.development.js:14376
performUnitOfWork @ react-dom.development.js:16625
workLoop @ react-dom.development.js:16665
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
replayUnitOfWork @ react-dom.development.js:16040
renderRoot @ react-dom.development.js:16722
performWorkOnRoot @ react-dom.development.js:17350
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
7index.js:342 Uncaught TypeError: Object(...) is not a function
at H (index.js:342)
at mountIndeterminateComponent (react-dom.development.js:13922)
at beginWork (react-dom.development.js:14376)
at performUnitOfWork (react-dom.development.js:16625)
at workLoop (react-dom.development.js:16665)
at HTMLUnknownElement.callCallback (react-dom.development.js:107)
at Object.invokeGuardedCallbackDev (react-dom.development.js:144)
at invokeGuardedCallback (react-dom.development.js:191)
at replayUnitOfWork (react-dom.development.js:16040)
at renderRoot (react-dom.development.js:16722)
at performWorkOnRoot (react-dom.development.js:17350)
at performWork (react-dom.development.js:17272)
at performSyncWork (react-dom.development.js:17245)
at interactiveUpdates$1 (react-dom.development.js:17526)
at interactiveUpdates (react-dom.development.js:2248)
at dispatchInteractiveEvent (react-dom.development.js:4747)
H @ index.js:342
mountIndeterminateComponent @ react-dom.development.js:13922
beginWork @ react-dom.development.js:14376
performUnitOfWork @ react-dom.development.js:16625
workLoop @ react-dom.development.js:16665
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
replayUnitOfWork @ react-dom.development.js:16040
renderRoot @ react-dom.development.js:16722
performWorkOnRoot @ react-dom.development.js:17350
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:1375 The above error occurred in the component:
in Ce (created by t)
in div (created by t)
in t (at sheetGallery.js:96)
in div (at sheetGallery.js:90)
in div (at sheetGallery.js:89)
in section (at sheetGallery.js:83)
in SheetGallery (at companySheet.js:182)
in div (at companySheet.js:99)
in CompanySheet (at page.js:224)
in div (at page.js:200)
in div (at page.js:187)
in I18n (at page.js:184)
in Page (at desktop.js:89)
in Route (at desktop.js:89)
in div (at desktop.js:81)
in div (at desktop.js:57)
in component (created by Route)
in Route (at desktop.js:56)
in Switch (at desktop.js:55)
in Router (created by BrowserRouter)
in BrowserRouter (at desktop.js:54)
in div (at desktop.js:53)
in Desktop (at App.js:103)
in Route (at App.js:103)
in div (at App.js:94)
in component (created by Route)
in Route (at App.js:93)
in Switch (at App.js:92)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:91)
in div (at App.js:85)
in App (at index.js:6)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1375
r @ backend.js:6
logCapturedError @ react-dom.development.js:14833
logError @ react-dom.development.js:14871
update.callback @ react-dom.development.js:15606
callCallback @ react-dom.development.js:11308
commitUpdateQueue @ react-dom.development.js:11358
commitLifeCycles @ react-dom.development.js:15019
commitAllLifeCycles @ react-dom.development.js:16198
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
commitRoot @ react-dom.development.js:16345
completeRoot @ react-dom.development.js:17413
performWorkOnRoot @ react-dom.development.js:17354
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:1375 The above error occurred in the component:
in F (created by z)
in div (created by z)
in z (created by j)
in div (created by j)
in j (created by t)
in div (created by t)
in t (at sheetGallery.js:96)
in div (at sheetGallery.js:90)
in div (at sheetGallery.js:89)
in section (at sheetGallery.js:83)
in SheetGallery (at companySheet.js:182)
in div (at companySheet.js:99)
in CompanySheet (at page.js:224)
in div (at page.js:200)
in div (at page.js:187)
in I18n (at page.js:184)
in Page (at desktop.js:89)
in Route (at desktop.js:89)
in div (at desktop.js:81)
in div (at desktop.js:57)
in component (created by Route)
in Route (at desktop.js:56)
in Switch (at desktop.js:55)
in Router (created by BrowserRouter)
in BrowserRouter (at desktop.js:54)
in div (at desktop.js:53)
in Desktop (at App.js:103)
in Route (at App.js:103)
in div (at App.js:94)
in component (created by Route)
in Route (at App.js:93)
in Switch (at App.js:92)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:91)
in div (at App.js:85)
in App (at index.js:6)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1375
r @ backend.js:6
logCapturedError @ react-dom.development.js:14833
logError @ react-dom.development.js:14871
update.callback @ react-dom.development.js:15606
callCallback @ react-dom.development.js:11308
commitUpdateQueue @ react-dom.development.js:11358
commitLifeCycles @ react-dom.development.js:15019
commitAllLifeCycles @ react-dom.development.js:16198
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
commitRoot @ react-dom.development.js:16345
completeRoot @ react-dom.development.js:17413
performWorkOnRoot @ react-dom.development.js:17354
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:1375 The above error occurred in the component:
in N (created by j)
in div (created by j)
in j (created by t)
in div (created by t)
in t (at sheetGallery.js:96)
in div (at sheetGallery.js:90)
in div (at sheetGallery.js:89)
in section (at sheetGallery.js:83)
in SheetGallery (at companySheet.js:182)
in div (at companySheet.js:99)
in CompanySheet (at page.js:224)
in div (at page.js:200)
in div (at page.js:187)
in I18n (at page.js:184)
in Page (at desktop.js:89)
in Route (at desktop.js:89)
in div (at desktop.js:81)
in div (at desktop.js:57)
in component (created by Route)
in Route (at desktop.js:56)
in Switch (at desktop.js:55)
in Router (created by BrowserRouter)
in BrowserRouter (at desktop.js:54)
in div (at desktop.js:53)
in Desktop (at App.js:103)
in Route (at App.js:103)
in div (at App.js:94)
in component (created by Route)
in Route (at App.js:93)
in Switch (at App.js:92)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:91)
in div (at App.js:85)
in App (at index.js:6)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1375
r @ backend.js:6
logCapturedError @ react-dom.development.js:14833
logError @ react-dom.development.js:14871
update.callback @ react-dom.development.js:15606
callCallback @ react-dom.development.js:11308
commitUpdateQueue @ react-dom.development.js:11358
commitLifeCycles @ react-dom.development.js:15019
commitAllLifeCycles @ react-dom.development.js:16198
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
commitRoot @ react-dom.development.js:16345
completeRoot @ react-dom.development.js:17413
performWorkOnRoot @ react-dom.development.js:17354
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
7index.js:1375 The above error occurred in the component:
in H (created by M)
in div (created by M)
in M (created by t)
in div (created by t)
in t (at sheetGallery.js:96)
in div (at sheetGallery.js:90)
in div (at sheetGallery.js:89)
in section (at sheetGallery.js:83)
in SheetGallery (at companySheet.js:182)
in div (at companySheet.js:99)
in CompanySheet (at page.js:224)
in div (at page.js:200)
in div (at page.js:187)
in I18n (at page.js:184)
in Page (at desktop.js:89)
in Route (at desktop.js:89)
in div (at desktop.js:81)
in div (at desktop.js:57)
in component (created by Route)
in Route (at desktop.js:56)
in Switch (at desktop.js:55)
in Router (created by BrowserRouter)
in BrowserRouter (at desktop.js:54)
in div (at desktop.js:53)
in Desktop (at App.js:103)
in Route (at App.js:103)
in div (at App.js:94)
in component (created by Route)
in Route (at App.js:93)
in Switch (at App.js:92)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:91)
in div (at App.js:85)
in App (at index.js:6)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1375
r @ backend.js:6
logCapturedError @ react-dom.development.js:14833
logError @ react-dom.development.js:14871
update.callback @ react-dom.development.js:15606
callCallback @ react-dom.development.js:11308
commitUpdateQueue @ react-dom.development.js:11358
commitLifeCycles @ react-dom.development.js:15019
commitAllLifeCycles @ react-dom.development.js:16198
callCallback @ react-dom.development.js:107
invokeGuardedCallbackDev @ react-dom.development.js:144
invokeGuardedCallback @ react-dom.development.js:191
commitRoot @ react-dom.development.js:16345
completeRoot @ react-dom.development.js:17413
performWorkOnRoot @ react-dom.development.js:17354
performWork @ react-dom.development.js:17272
performSyncWork @ react-dom.development.js:17245
interactiveUpdates$1 @ react-dom.development.js:17526
interactiveUpdates @ react-dom.development.js:2248
dispatchInteractiveEvent @ react-dom.development.js:4747
index.js:1071 Uncaught TypeError: Object(...) is not a function
at Ce (index.js:1071)
at mountIndeterminateComponent (react-dom.development.js:13922)
at beginWork (react-dom.development.js:14376)
at performUnitOfWork (react-dom.development.js:16625)
at workLoop (react-dom.development.js:16665)
at renderRoot (react-dom.development.js:16702)
at performWorkOnRoot (react-dom.development.js:17350)
at performWork (react-dom.development.js:17272)
at performSyncWork (react-dom.development.js:17245)
at interactiveUpdates$1 (react-dom.development.js:17526)
at interactiveUpdates (react-dom.development.js:2248)
at dispatchInteractiveEvent (react-dom.development.js:4747)

My code is the following:

import React, { Component } from 'react';
import FsLightbox  from 'fslightbox-react';

export default class MyGallery extends Component {
   constructor(props){
      super(props);
      this.state = {
         openLightbox: false,
         indexLightbox: 0
      };

      this.arrLightbox = ["https://via.placeholder.com/300x300?text=Test_1","https://via.placeholder.com/300x300?text=Test_2"];

   }

   openLightbox(i){
      this.setState({
         openLightbox: !this.state.openLightbox,
         indexLightbox: i
      });
   }

   render() {
      return (
         <div>

                  {this.arrLightbox.map((item, index) =>(
                     <img key={index} src={item} onClick={() => this.openLightbox(index)} />
                  ))}
                  <FsLightbox
                     toggler={this.state.openLightbox}
                     sources={this.arrLightbox}
                  />
         </div>
      );
   }
}

Add null checks for localStorage

There seems to be an error coming from this package:
TypeError: null is not an object (evaluating 'localStorage.getItem').

I suppose a null check is missing here. Disabling localStorage doesn't seem to help, as it is still being used in some places.

Device: iPhone
Browser: Mobile Safari 12.1.2

.types prop only works for first image?

Hi,

I'm having problems with "invalid file" and I cannot move the files to the same server, so I tried setting the types props, but it seems it only works for the first image.

<FsLightbox
      toggler={props.toggle}
      urls={["https://unsplash.com/photos/WWVD4wXRX38/download?force=true", "https://unsplash.com/photos/WWVD4wXRX38/download?force=true", "https://unsplash.com/photos/WWVD4wXRX38/download?force=true"]}
      slide={props.slideNr}
      types={ [ 
        'image'
      ] } 
    />

inserting margin on body

Has anyone noticed that when you click on an image the background shifts. I see that there is a margin-right: 0px property inserted on the body. Any idea why this is happening?

Can't input image urls of google firebase storage.

Version

    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "firebase": "^6.2.4",
    "@firebase/app": "^0.4.9",
    "@firebase/firestore": "^1.4.3",
    "@zeit/next-css": "^1.0.1",
    "@zeit/next-sass": "^1.0.1",

I tried to input image URLs of google firebase storage to sources of fsLightbox component.
However, it occurs error "Invalid files".

Keyboard interaction won't update fullscreen state

The issue could be observed on https://fslightbox.com/react as well.

STEPS TO REPRODUCE:
Enter full screen mode through keyboard and check full screen button, it won't be updated. The full screen state is not integrated with keyboard i.e. ESC key for closing full screen and F11 for entering full screen.

image

ADDITIONAL ISSUE:
If the page is already in full screen and the fslightbox is toggled true, adjusting full screen icon button won't work at all.

Vimeo support

Hi,

I have been trying to figure out a way to incorporate Vimeo videos with the plugin but couldn't get it to work, is Vimeo currently not supported?

love this plugin, I've been playing around with it for 2 days and I'm loving it!

[PRO] sourceIndex in combination with onSlideChange interferes slide change

i am using onSlideChange together with either slide or sourceIndex to update a state.
But it doesnt do anything. The whole Slideshow is stuck on the slide you wanted to open.

When i disable slides and i skip further than the last Image, it does not display anything.

I am using only videos and i am using it on React 16.14.0.

I am thankful for any help.

Taping on custom sources root element will close the lightbox

Another issue I found is when using custom sources the lightbox closes if you tap on the item needing presented. Looking through the sources reveals this:

if (!isSourceDownEventTarget) {
                self.hide();
            }

And the boolean is determined from:

if (e.target.classList.contains('fslightbox-source')) {
            isSourceDownEventTarget = true;
        }

Seems like the inner component in my div (the div has the fslightbox-souece class) is not picking up the click event. I could fix this by setting pointer-events:all on the div, but that causes the slider to freeze when dragging to change the slide.

See example here:
https://codesandbox.io/s/empty-breeze-e4fpc

Collapse during lightbox container remount

I just try to find a way to rerender the Lightbox when sources have been changed.
According to the documentation - if want to display new sources I need to change the React key prop of the Lightbox component.
But when I'm doing that Lightbox just disappears without any errors.
Here some sample to reproduce

import React, { useState } from 'react';
import FsLightbox from 'fslightbox-react';

function App() {
    const productsImages = [
        'https://picsum.photos/800/800',
        'https://picsum.photos/800/700',
        'https://picsum.photos/800/600',
    ];

    const [toggler, setToggler] = useState(false);
    const [productIndex, setProductIndex] = useState(0);

    return (
        <>
            <button onClick={() => setToggler(!toggler)}>
                Toggle Lightbox
            </button>
            <button onClick={() => setProductIndex(productIndex+1)}>
                Load next product
            </button>
            <FsLightbox
                toggler={toggler}
                sources={productsImages}
                key={productIndex}
            />
        </>
    );
}

export default App;

Thanks in advance for any hints.

Ability to set scale for image zoom

Currently the library zooms in with 0.25 scale increments.

When a user needs to look at minute details in the images this takes quite a few clicks to make the image large enough or even bring it to its full size.

Setting image zoom increments in props would be a simple change.

This is a really USEFUL library especially for quick content-review use, but adding more customization via props would be AMAZING. Keep up the good work.

Don't remember "invalid" type in localStorage

Sometimes the type check fails because of network issues, but later it can pass. So it probably makes sense not to store "invalid" result forever.

Just to be clear: I know that I can avoid those checks at all by passing explicit media types or disable local storage with disableLocalStorage, but I think that it still makes sense to keep retrying after errors in "detect" mode

Is it possible to make a custom thumb?

I have a usecase in which I'd like to provide image author attribution in the thumbnail, but not sure if it is possible to pass a component as a thumb.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.