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

uxcore-album

v0.3.27

Published

uxcore-album component for uxcore.

Downloads

115

Readme

uxcore-album

React album

NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

Development

git clone https://github.com/uxcore/uxcore-album
cd uxcore-album
npm install
npm run server

if you'd like to save your install time,you can use uxcore-tools globally.

npm install uxcore-tools -g
git clone https://github.com/uxcore/uxcore-album
cd uxcore-album
npm install
npm run dep
npm run start

Test Case

npm run test

Coverage

npm run coverage

Demo

http://uxcore.github.io/components/album

Contribute

Yes please! See the CONTRIBUTING for details.

API

Album.Props

| Name | Type | Required | Default | Comments | |---|---|---|---|---| | width | number or string | no | '' | the default image cover's width | | height | number or string | no | '' | the default image cover's height | | current | number | no | 0 | the current shown photo index | | enableKeyBoardControl | boolean | no | true | whether the album can be controlled by the keyboard navigation | | maskClosable | boolean | no | true | whether click mask to close, this prop will be ignored if set closable prop to false | | enableThumbs | boolean | no | false | whether the show thumbnail list| | thumbPlacement | string | no | right | the placement of thumbnail, you can set 'top'/'right'/'bottom'/'left'/ | | thumbBackground | string | no | #000 | if the image couldn't cover the gird, give it a background| | showButton | boolean | no | false | show the function button(zoomIn/zoomOut) | | customButtons | { icon: ReactElement, onClick: function } | Array<{ icon: ReactElement, onClick: function }> | no | [] | custom function buttons which would be put between zoomIn button and zoomOut button | | onChange | function(index) | no | | Callback method when change | | onOpen | function(index) | no | | Callback method when open | | onClose | function | no | | Callback method when close |

Photo.Props

| Name | Type | Required | Default | Comments | |---|---|---|---|---| | src | string | yes | '' | same as img's src | | thumb-src | string | no | '' | set thumbnail image source if 'enableThumbs' is true |

Method

Album.show(config)

With this method, the component can be used by calling Album.show({src: 'foo/url'}) or Album.show({photos: [<Photo src="#url1" />, <Photo src="#url2" />]}) directly.

config

| Name | Type | Required | Default | Comments | |---|---|---|---|---| | src | string | false | null | the image src | | photos | array of Photo | false | [] | array of Photo element | | getContainer | function | false | the function will append a new div to document body. | define the container which album rendered into | | onChnage | function(index) | false | | Callback method when change | | onClose | function() | false | | Callback method when close | | showButton | boolean | no | false | show the function button(zoomIn/zoomOut) | | customButtons | { icon: ReactElement, onClick: function } | Array<{ icon: ReactElement, onClick: function }> | no | [] | custom function buttons which would be put between zoomIn button and zoomOut button |