Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Gian Nicola Caggiano
Gian Nicola Caggiano
11,898 Points

Custom arrows in slick slider

Hi! I want to replace the default arrows of slick slider with the Font Awesome ones. Have you already tried this?

1 Answer

Hey Gian,

Slick has a two (prevArrow and nextArrow) settings available to change the HTML string for the next and previous arrows. It defaults to

<button type="button" class="slick-prev">Previous</button>

and

<button type="button" class="slick-prev">Next</button>

You could change the string on each one to Font Awesome's syntax and you should be good to go.

For instance:

$('.selector').slick({
  nextArrow: '<i class="fa fa-arrow-right"></i>',
  prevArrow: '<i class="fa fa-arrow-left"></i>',
// add the rest of your options here
});