user3191160 user3191160 - 3 months ago 98
CSS Question

Carousel Slider for Custom Theme in Shopify

I am currently creating a custom theme in Shopify using the Timber Framework and one of the requirements is to add a carousel slider that will show 3 boxed images that will slide automatically, as well as having the left/right buttons to allow the user to manually change the slider.

I am not sure if I will need to create something from scratch so was looking for some advice on how I should tackle this.

Answer

We would typically use http://owlgraphic.com/owlcarousel/ on a Shopify theme. To get you started, something like the following should get you up and running:

$(".owl-carousel").owlCarousel({
  'items': 1,
  'navigation': true,
  'navigationText': ['<','>'],
  'pagination': false
});

Then just read the docs for creating the elements needed. This particular slider has swipe enabled which is handy for mobile users too.

Comments