All Projects → ciampo → Macro Carousel

ciampo / Macro Carousel

Licence: mit
Carousel as a Vanilla Web Component.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Macro Carousel

Ken Burns Carousel
🌄 A web component that displays a set of images with a ken burns effect
Stars: ✭ 106 (+100%)
Mutual labels:  carousel, web-component
Img Comparison Slider
Image comparison slider. Compare images before and after. Supports React, Vue, Angular.
Stars: ✭ 45 (-15.09%)
Mutual labels:  web-component
Carouselview
Carousel View
Stars: ✭ 22 (-58.49%)
Mutual labels:  carousel
Scroll Snap Carousel
Carousel based on CSS Scroll Snap functionality
Stars: ✭ 31 (-41.51%)
Mutual labels:  carousel
Egjs Flicking
🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
Stars: ✭ 937 (+1667.92%)
Mutual labels:  carousel
Centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Stars: ✭ 965 (+1720.75%)
Mutual labels:  carousel
React Carousel
React carousel component.
Stars: ✭ 16 (-69.81%)
Mutual labels:  carousel
Tiny Swiper
Ingenious JavaScript Carousel powered by wonderful plugins. Lightweight yet extensible. Import plugins as needed, No more, no less.
Stars: ✭ 1,061 (+1901.89%)
Mutual labels:  carousel
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+14752.83%)
Mutual labels:  carousel
React Grid Carousel
React responsive carousel component w/ grid layout
Stars: ✭ 29 (-45.28%)
Mutual labels:  carousel
Hammer Slider
DISCONTINUED - HammerSlider touch is a lightweight infinite carousel plugin.
Stars: ✭ 21 (-60.38%)
Mutual labels:  carousel
Framecarousel
A jQuery plugin for quickly creating carousels within frames
Stars: ✭ 14 (-73.58%)
Mutual labels:  carousel
Lwc
⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
Stars: ✭ 974 (+1737.74%)
Mutual labels:  web-component
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-50.94%)
Mutual labels:  carousel
Ngx Siema
Lightweight and simple carousel with no dependencies.
Stars: ✭ 46 (-13.21%)
Mutual labels:  carousel
Paper Timezone
Polymer based timezone selection component
Stars: ✭ 19 (-64.15%)
Mutual labels:  web-component
React Whirligig
A react carousel/slider like component for sequentially displaying slides or sets of slides
Stars: ✭ 20 (-62.26%)
Mutual labels:  carousel
React Splide
The Splide component for React.
Stars: ✭ 32 (-39.62%)
Mutual labels:  carousel
Ar Gif
Easy to use augmented reality web components
Stars: ✭ 52 (-1.89%)
Mutual labels:  web-component
Vaadin Charts
Vaadin Charts is a feature-rich interactive graph library that answers the data visualization needs of modern web applications
Stars: ✭ 47 (-11.32%)
Mutual labels:  web-component

<macro-carousel> · npm version Build Status Coverage Status GitHub license

<macro-carousel> is a carousel (vanilla) Web Component.

DEMOS | DOCS

  • Compatible with every framework
  • Public APIs exposed as methods, events and properties/attributes
  • Mouse and touch events
  • Previous and next buttons
  • Pagination indicators
  • Multiple slides per view
  • Customisable styles though CSS custom properties
  • Focused on a11y
  • no external dependencies

Installation

npm install --save macro-carousel

It is reccommended to install the inert and focus-visible polyfills (listed as peerDependencies).

Running the project locally

Run npm install to install all local dependencies.

Run npm start and open the http://localhost:8080/demo/ page in your browser.

Usage

Please read the full documentation

<macro-carousel>
  <div>First slide</div>
  <div>Second slide</div>
  <div>Third slide</div>
</macro-carousel>

<script src="macro-carousel.min.js" defer></script>

For more examples, look at the demos (Live demo, Demo code)

Browser support

WebComponent Polyfills suite

In order for this Web Component to work on all evergreen browsers, you may need to add the WebComponent polyfills suite to your page. (Please note that this repository focuses on the macro-carousel Web Component, and not on the polyfills)

All the demos in this repository already make use of the polyfills (by using webcomponents-loader.js). The source code of the macro-carousel Web Component also makes optional calls to the ShadyCSS polyfill.

Because of the ShadyCSS polyfill limitations, certain style rules are not applied in polyfilled browsers:

  • all the rules that rely on the :host-context() selector are not polyfilled correctly (these rules are mainly around using the focus-visible polyfill)
  • some of the more complex selectors using :host() are also not supported. This mainly impact the hover/focus states on navigation buttons.
  • normally, external styles have the priority over the internal Web Component styles. But sometimes, after the polyfill's transformation, some internal selectors end up having a higher specificity then the external ones. This is quite an edge case, but keep an eye for it (e.g.: the custom navigation demo uses the !important keyword to force some styles).

For browsers not supporting ES6 classes, the tranpiled ES5 version can be used instead (macro-carousel.es5.min.js), together with the custom-elements-es5-adapter.js polyfill. The es5 demo shows how to do that.

As browser support grows and the polyfills improve, these limitations should become less and less frequent and problematic.

Other known cross-browser limitations

In order to change the color of the navigation button arrow, this project makes use of the mask-image CSS property. Unofruntaly, when this CSS feature is not supported, the color defined through --macro-carousel-navigation-color-focus is not going to be applied correctly to the arrow.

Test

Run npm test to run all tests.

Whishlist

Please have a look at the backlog to see the plan for the next releases.

If you have a feature request, feel free to open an issue!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].