Skip to content

stagas/gallery

Repository files navigation

gallery

The UI piece for a potential gallery image selector/uploader.

The test implements one with component/upload and an express backend to get you started.

Installing

component-install stagas/gallery

Events

  • select when user selects (clicks) an image
  • change(newImage, oldImage) when user chooses a different image
  • files(FileList) when user chooses files to upload
  • end when user has ended interacting with the gallery
  • show when gallery is shown
  • hide when gallery is hidden

API

Gallery()

Gallery class.

Gallery.set(path:String, files:Array)

Set path and files.

Gallery.add(file:String)

Add image file to collection.

Gallery.select(index:Number)

Selects an image.

Gallery.render()

Render gallery view.

Gallery.show(el:Element)

Show gallery. Lazily render if not already.

Gallery.hide()

Hide gallery.

License

MIT

About

The UI piece for a potential gallery image selector/uploader

Resources

Stars

Watchers

Forks

Packages

No packages published