Custom Paging with text instead of dots
See original GitHub issueHi,
I’m wondering if there is a way to create a custom pagination section, similar to what is being done here on the non-React version of Slick: https://codepen.io/norman_pixelkings/pen/NNbqgG
I’ve tried what’s being done in that Pen and only get slider x
as a result of logging slider
.
I’ve tried logging props as well and it doesn’t seem like any props are passed to the customPaging.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Add custom setting (customPaging - replace dots with text)
I'd like to replace the pager dots with text (preferably text from alt or title tag from corresponding slideshow image). I know that...
Read more >Developers - Custom Paging with text instead of dots -
Hi,. I'm wondering if there is a way to create a custom pagination section, similar to what is being done here on the...
Read more >javascript - How to add dots between paginated numbers in ...
How to add dots between paginated numbers in pagination only with Pure JS and not with any library or framework? · Subscribe to...
Read more >How to Build a Custom Pagination Component in React
In this post, we will focus on pagination and we'll build a custom controlled component that handles page buttons based on the current...
Read more >Custom Paging - React Slick Documentation - neostack
... dots: true, dotsClass: "slick-dots slick-thumb", infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1 }; return ( <div> <h2>Custom Paging</h2> ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@davidprae I don’t know if this helps, but what I ended up doing was this:
The settings, which populate the custom paging:
And then I loop through the data that I pass into the slider anyway, and create a new Array of ‘Labels’ to pass specifically to the
customPagination
setting:@paschalidi
` const settings = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1, arrows: false, appendDots: dots => { const customDots = React.Children.map(dots, dot => { if (dot.props[‘className’] === ‘slick-active’) { return React.cloneElement(dot, { className: classnames(styles.slickActive), }); } else { return React.cloneElement(dot, { className: classnames(styles.slickNon), }); } });
I’ve manage to customise the active classes by using children props classname and the i add my own active classes