preact-flickity-component

1.0.1 • Public • Published

Preact Flickity Component

This is an adaption of @theolampert's React Flickity Component that is compatible to Preact.

It doesn't use PropTypes, Portals or any of that fancy React stuff.

I built it because I needed to mount a Flickity Slider, and I'm afraid that I will have to do it again at some point in my career.

Usage

import { h, Component } from 'preact'
import Carousel from 'preact-flickity-component'
 
export default class CarouselContainer extends Component {
  render (props, state) {
    const flickityOptions: {
      pageDots: false,
      wrapAround: true 
    }
 
    return <Carousel className="Slider" options={flickityOptions}>
      <div>1</div>
      <div>2</div>
      <div>3</div>
    </Carousel>
  }
}

License Information:

GPLv3

Flickity may be used in commercial projects and applications with the one-time purchase of a commercial license. http://flickity.metafizzy.co/license.html

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i preact-flickity-component

      Weekly Downloads

      0

      Version

      1.0.1

      License

      GPL-3.0

      Unpacked Size

      2.87 kB

      Total Files

      3

      Last publish

      Collaborators

      • danieldiekmeier