Skip to content

What component to use for pagination (Prev vs. Next) #938

Answered by kate-porter
ishah-twilio asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ishah-twilio -

Does each page in the table have its own URL? If so, then you should use Anchor for "Next" and "Previous". If each page does NOT have its own URL, then you should use Button.

If you end up using Button, then you can just use a disabled button when the user is on the first or last page.

If you end up using Anchor, I would suggest just hiding the "Next" or "Previous" link when the user is on the first or last page. Links / Anchors cannot have a disabled state, so that's probably the easiest approach.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by kate-porter
Comment options

You must be logged in to vote
2 replies
@kate-porter
Comment options

@ishah-twilio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants