Responsive
Carousel works fine on any device: desktop, tablet or mobile an adapt number of items visible (configurable).
--- layout: default route: index fixed-navbar: false title: Quick-Start subtitle: bulma.io Carousel/Slider component --- {% capture component_include_css %} {% endcapture %} {% capture component_include_sass %} @charset "utf-8" // Import Bulma core @import 'bulma.sass' // Import component @import "bulmaCarousel.sass" {% endcapture %} {% capture component_include_es5 %} {% endcapture %} {% capture component_include_es6 %} import bulmaCarousel from '~bulma-carousel/dist/js/bulma-carousel.min.js'; {% endcapture %} {% capture component_starter_template %}
Carousel works fine on any device: desktop, tablet or mobile an adapt number of items visible (configurable).
Many options to customize behavior. Use of sass variables to easily customize design.
Pure JavaScript to manage user interaction.
There are several ways to get started with Bulma-extensions. You can either:
Use npm to install and stay up to date in the future
{% highlight shell %}npm install bulma-carousel{% endhighlight %}Use the GitHub repository to get the latest development version
This method requires git installed on your computer.
{% highlight shell %}git clone git://github.com/Wikiki/bulma-carousel.git{% endhighlight %}If you want to get started right away, you can use this HTML starter template. Just copy/paste this code in a file and save it on your computer.
The best way to start with carousel is to use a simple div to encaspulate your items. All child will then be used as Carousel Item:
{% highlight html %}{{ component_starter_template }}{% endhighlight %}
{% highlight html %}{{ component_hero_starter_template }}{% endhighlight %}
You are only at 3 simple steps to work with bulmaCarousel.
The first step is to include the stylesheet into your project. You can use either the minified CSS version or the Sass source to integrate it into a more global project.
{% highlight html %}{{ component_include_css }}{% endhighlight %}
{% highlight html %}{{ component_include_sass }}{% endhighlight %}
Second step is to include the JavaScript part of the component.
{% highlight html %}{{ component_include_es5 }}{% endhighlight %}
{% highlight javascript %}{{ component_include_es6 }}{% endhighlight %}
Now all that remains is to intiate the component to all elements you want to transform into a Carousel
{% highlight javascript %}{{ component_init_es5 }}{% endhighlight %}
{% highlight javascript %}{{ component_init_es6 }}{% endhighlight %}
Carousel component provides some public methods to manually work with it.
{% include methods.html %}Carousel component provides some public Getters to manually access properties.
{% include getters.html %}Carousel component comes with Events Management API so you can easily react to its behavior.
{% include events.html %}Example working with "show" event:
{% highlight javascript %}{{ component_events }}{% endhighlight %}