Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsJul 25, 2026·2 min de lectura

React Slick — Carousel Component for React Applications

A React wrapper around the Slick carousel library providing responsive slides, lazy loading, and swipe support for building image and content carousels.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
React Slick Overview
Comando de instalación directa
npx -y tokrepo@latest install 2ba5c5ea-8869-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

React Slick is a React port of the popular Slick jQuery carousel. It provides a declarative component API for building responsive, touch-enabled carousels with features like autoplay, lazy loading, and custom navigation.

What React Slick Does

  • Renders responsive carousels with configurable breakpoints
  • Supports infinite scrolling, autoplay, and fade transitions
  • Provides swipe and touch gesture support for mobile devices
  • Enables lazy loading of slide images for performance
  • Allows custom prev/next arrows and dot indicators

Architecture Overview

The library wraps each child element in a slide container and manages a track element that translates horizontally or fades between slides. Responsive settings are applied via a breakpoints array that maps viewport widths to slide-count configurations. The internal state machine handles animation timing, swipe velocity, and edge snapping.

Self-Hosting & Configuration

  • Install both react-slick and slick-carousel as dependencies
  • Import the slick CSS files for default styling
  • Configure via props: slidesToShow, slidesToScroll, autoplay, speed
  • Use responsive prop array for breakpoint-specific settings
  • Access slider methods via ref (slickNext, slickPrev, slickGoTo)

Key Features

  • Responsive design with per-breakpoint configuration
  • Swipe and drag support out of the box
  • Lazy loading with onLazyLoad callback
  • Center mode for highlighting the active slide
  • Variable width slides for mixed-content carousels

Comparison with Similar Tools

  • Embla Carousel — Lightweight and extensible; React Slick offers more built-in features
  • Swiper — Framework-agnostic with 3D effects; React Slick is simpler for basic carousels
  • Keen Slider — Smaller bundle size; React Slick has broader community adoption
  • Nuka Carousel — Pure React; React Slick wraps the mature Slick engine
  • Splide — Accessibility-focused; React Slick has a larger plugin ecosystem

FAQ

Q: Why do I need both react-slick and slick-carousel? A: react-slick provides the React component; slick-carousel supplies the CSS styles and assets.

Q: How do I handle dynamic slide content? A: Wrap dynamic children normally. Call slickGoTo(0) after data changes if you need to reset position.

Q: Does it support server-side rendering? A: Yes, but wrap the Slider in a client-only boundary if you encounter hydration mismatches.

Q: How do I customize arrows? A: Pass custom React components via the nextArrow and prevArrow props.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados