Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1>Filter Slick Slider</h1>
<p>This is a demo of slick slider filter functionality for an answer to a question on <a href=""></a>.</p>
<form class="filter">
  <div class="filter-group">
    <span class="color-filter" data-value="">All</span> |     
    <span class="color-filter" data-value=".black">black</span> |
    <span class="color-filter" data-value=".white">white</span> |
    <span class="color-filter" data-value=".green">green</span>
      <span class="device-filter" data-value="">All</span> |
      <span class="device-filter" data-value=".phone">phone</span> |
      <span class="device-filter" data-value=".ipad">ipad</span> |
      <span class="device-filter" data-value=".tablet">tablet</span>
<div class="active-filter">
  Active filter: <span class="filter-class">none</span>
<div class="slick">
    <div class="slide black phone">black phone</div>
    <div class="slide white phone">white phone</div>
    <div class="slide green phone">green phone</div>
    <div class="slide black ipad">black ipad</div>
    <div class="slide white ipad">white ipad</div>
    <div class="slide green ipad">green ipad</div>
    <div class="slide black tablet">black tablet</div>
    <div class="slide white tablet">white tablet</div>
    <div class="slide green tablet">green tablet</div>


                .green {
  background-color: green;

.black {
  background-color: black;
  color: white;

.white {
  background-color: white;
  color: black;

/** Just some styling to make it more readable. */

html {
  margin: 1rem;

.filter {
  margin: 1rem 0;

.active-filter {
  margin: 1rem 0;

.slick {
  width: 400px;

.slick .slide {
  width: 200px;
  height: 100px;
  padding: 1rem;
  border: 1px solid #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;



    slidesToShow: 3,
    slidesToScroll: 1,
    autoplay: true,
    autoplaySpeed: 2000,
    infinite: true,
  $('form.filter span').on('click', function() {
    var filterClass = $(this).data('value');
    $('.slick').slick('slickFilter', filterClass);