Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.bowergithub.a1626:image-carousel

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.bowergithub.a1626:image-carousel

WebJar for image-carousel

  • 2.1.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

License Published on webcomponents.org Travis

It's a carousel element for Polymer 2.0.

Installation

  bower i --save image-carousel

Example

<image-carousel aria-label="example carousel">
  <template is="dom-repeat" items='["https://c2.staticflickr.com/2/1217/4607963354_e1a8fea210_z.jpg", "http://www.hdwallpapery.com/static/images/1391099215267_hero2_niQ3B7S.jpg", "https://tse4.mm.bing.net/th?id=ORT.TH_470633631&pid=1.12&eid=G.470633631"]' slot="images">
    <img src="[[item]]" class="scrolling-images" alt$="demo image alt [[index]]" width="100%" height="374px">
  </template>
</image-carousel>

Usage

Please keep following points in mind while using the element

  • As images will be part of light-dom please add property/attribute slot="image" to the container of the images (template in above example).
  • Images should have class named scrolling-images (Defining the class in not necessary, just add the attribute to image element).
  • In case, you want to change images dynamically do call computeNumberOfImages function afterwards. Carousel will fire image-carousel-changed event once all the changes are done. You can listen for it to do/read any further changes.
// assuming id of image-carousel element on which change needs to be done is image-carousel
this.$['image-carousel'].addEventListener('image-carousel-changed', () => {
  //further action goes here
});
  • As efforts have been made to keep this element accessible please add alt attribute to image tag and aria-label or aria-labelledby to image-carousel.

Web Accessibility

Web accessibility refers to practice of making web easily usable/accessible for people with disabilities. Here is a recent twitter post where people with disability tweeted what's the hardest thing about browsing the web, or if you like to read accumulated version please refer to this article.

Implementing accessibility (also known as WAI-ARIA, ARIA, a11y) in your project isn't as tough as it may look, it has been well documented by w3c and you read the documentation here. You can also look at some of there examples. If you like you can also follow these video tutorials posted on youtube by @robdodson.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT License

FAQs

Package last updated on 30 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc