I have to implement this component and have a hard time naming it. Does anyone have an idea?
<PageCarousel>
?
<PrevNextControl>
?
This happens quite often to me actually and I guess I am not alone.
What is your approach to solving these cases? Is there a place where you can search a library of interface elements and find the correct name?
My default approach is to search for similar comonents in a framework like https://material.io/components. Sometimes I check if the designer has already named it in Figma. Or, if I know another interface/website with that element, I'll see if it has a class name :)
Any input appreciated!
Top comments (9)
That's pretty much it Imo.
I'd go for
AppPageNavigation
. It's more distinctive than thePagination
, but probably not perfectly unambiguous.I do like PageNavigation!
I've called mine "Pagination" when I developed it. Still seems to me like the best option.
Yes, if this is your main pagination control it makes sense to call it like that.
In my case I already have a pagination that looke like this:
Why bunny?
In my case it is a React element.
Interesting read though, I think a lot about naming stuff.
I was wondering why it is required to include a hypen and it was explained:
Thanks for your comment!
I would relate the name to "Pagination"
<Page> ? <Pagination> <nextPage> <prevPage>
Check this out
mui.com/material-ui/react-pagination/
It definitely is a pagination thing. I already have a "real" pagination component so I disregarded this, but yes, you are right.
Something like
<MicroPagination>
or<MiniPagination>
would already be better than what I have.Or I could use my existing pagination and configure it with
showPages={false}
or something like that.Thanks!
To me, "Pagination" is not really the best name because its meaning doesn't really describe the control well. I would go with "PageSelector"
PageSelector, I love it. 🙌