akiran / akiran/react-slick

Feature Request: Add offset prop for autoplay initial delay

オープン
#2,443 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。