leecade / leecade/react-native-swiper
Clickable dots
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
I would like an option to make each dot into a button that navigates to its respective slide. Does anyone else think this is a good option?
A simple approach could be to add a property called renderDot(index:number, isActive:boolean, onPress:function) that would provide a dot, like so:
const renderDot = (index, isActive, onPress) => {
return <Button onPress={onPress} ....
}
<Swiper renderDot={renderDot} />
Or, instead of adding a new property, dot and activeDot could be enhanced to support a function that returns a react element instead of just a react element. If @leecade is okay with it, I'll submit the PR
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Swiper component and its existing dot and activeDot rendering, which the issue identifies as the relevant entry point; no file or test is specified. Confirm the intended API with maintainers, then verify that each rendered dot navigates to its corresponding slide and preserves active-state behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100