npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

crow-media-gallery

v0.1.5

Published

Media gallery react component work with crow-ligthbox-reader to show selectable gallery of media with lightbox render on click audio video and image ...

Downloads

2

Readme

CrowMediaGallery

v0.1.5

Hi !! here we have react component I made, its a media selectable gallery with options and lightbox render if you want to get just the lightbox-reader you ga go to the github_project.

Install MediaGallery

First you know need to install the project you have 3 way :

  • download on github download zip.
  • clone on github git clone https://github.com/InitialCrow/crow-media-gallery
  • install via npm npm install crow-media-gallery --save

just do npm install on directory if you clone from github to install dependencies to work and install this component

Use CrowMediaGallery

CrowMediaGallery is work with react so make sure you have install react

load component

import CrowMediaGallery from 'crow-media-gallery'

or

let CrowMediaGallery = require('crow-media-gallery')

use component

I take simple exemple of use but you can import Media on container to

    import React from 'react';
    import ReactDOM from 'react-dom';
    import CrowMediaGallery from 'crow-media-gallery';
    
   const items = [
	{
		type : "image", // type is needed to difere type of media
		src : "https://static.pexels.com/photos/67636/rose-blue-flower-rose-blooms-67636.jpeg",
		desc : "my desc here",
		alt : "my alt here",
		width : 4928,
		height :3264,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false // is needed if you enable media select function
	},
	{
		type : "image",
		src : "https://www.w3schools.com/w3css/img_fjords.jpg",
		desc : "my desc2 here",
		alt : "my alt here",
		width : 300,
		height :300,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
	
	{
		type : "image",
		src : "http://reparation-materiel-montagne.fr/wp-content/uploads/2017/09/trial-300x300.jpg",
		desc : "my desc here",
		alt : "my alt here",
		width : 300,
		height :300,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
	{
		type : "video",
		src : "http://vjs.zencdn.net/v/oceans.mp4",
		desc : "my desc here4",
		thumbWidth: 150,
		width : 1080,
		height :450,
		thumbHeight : 150,
		isSelected : false
	},
	{
		type : "audio",
		src : "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",
		thumbSrc : "https://au.yamaha.com/en/files/front%20page%20banner_1200x480_d5a393465b9094b78c6cde73d642f31e.jpg",
		desc : "my desc here",
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
]


ReactDOM.render(<CrowMediaGallery items={items} />, document.getElementById('root'));

like this you will have the MediaGallery as you can see we have props needed items props is pool of item you want to show follow this items array model

Options

if you want change MediaGallery settings you can do like this

    import React from 'react';
    import ReactDOM from 'react-dom';
    import CrowMediaGallery from 'crow-media-gallery';

    const gallerySettings = {
    	showSelect : true, // if you want selectable
    	debug : false, // if youo want to show debug message
    }
    const lightboxSettings = {
        showPool : true,
        showBtn : true,
        showDesc : true,
        showLightBox : false // state toggle true/false,
        nodeToHide : false,
        debug : false,
    }

const items = [ 
	{
		type : "image",
		src : "https://static.pexels.com/photos/67636/rose-blue-flower-rose-blooms-67636.jpeg",
		desc : "my desc here",
		alt : "my alt here",
		width : 4928,
		height :3264,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
	{
		type : "image",
		src : "https://www.w3schools.com/w3css/img_fjords.jpg",
		desc : "my desc2 here",
		alt : "my alt here",
		width : 300,
		height :300,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
	
	{
		type : "image",
		src : "http://reparation-materiel-montagne.fr/wp-content/uploads/2017/09/trial-300x300.jpg",
		desc : "my desc here",
		alt : "my alt here",
		width : 300,
		height :300,
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
	{
		type : "video",
		src : "http://vjs.zencdn.net/v/oceans.mp4",
		desc : "my desc here4",
		thumbWidth: 150,
		width : 1080,
		height :450,
		thumbHeight : 150,
		isSelected : false
	},
	{
		type : "audio",
		src : "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",
		thumbSrc : "https://au.yamaha.com/en/files/front%20page%20banner_1200x480_d5a393465b9094b78c6cde73d642f31e.jpg",
		desc : "my desc here",
		thumbWidth: 150,
		thumbHeight : 150,
		isSelected : false
	},
]


   ReactDOM.render(<CrowMediaGallery onSelect={(item)=>{myCallBack(item)// callback with item selected on param this cancel default select}} gallerySettings={gallerySettings} lightboxSettings={lightboxSettings} items={items} onCustomClick={(item,index)=>{myCallBack(item,index) // callback with item and index clicked on param this cancel default action on click item}} />, document.getElementById('root'));

here you have all settings you can change now

have good dev :)

License

MIT CrowMediaGallery is free to use mention is apreciate thank you.