akiran / akiran/react-slick

Feature Request: Add offset prop for autoplay initial delay

Abierto
#2,443 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
11.9k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Summary
Add an `offset` prop to delay the first autoplay transition.

### Problem
When using multiple sliders with autoplay on the same page, they all transition at the same time. There's no way to stagger them without manually controlling each slider with custom code.

### Proposed Solution
```javascript
const settings = {
autoplay: true,
autoplaySpeed: 5000,
offset: 2000, // Delay first transition by 2 seconds
// ... other settings
};
```

**Behavior:**
- Without offset: 0s → 5s → 10s → 15s
- With offset (2000): 2s → 7s → 12s → 17s

The offset only delays when autoplay starts, not the interval between slides.

### Contribution
I'm happy to submit a PR if this sounds good. Let me know!

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.