HDS Pagination - Auto-Switch to Simplified #11
abbybowman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature name
HDS Pagination: auto-switch to simplified on small screens
Feature area
Component patterns (cards, search, archive layouts, etc.)
Describe the idea
HDS pagination ships with three variants: bounded (numbered, known total), unbounded (numbered, unknown total), and simplified (Previous/Next text buttons only). Currently, developers choose which variant to render. This idea adds a CSS-only responsive pattern that automatically switches from a numbered variant to simplified on small viewports.
Both markup variants would need to be present in the DOM, with CSS media queries toggling visibility:
This fits HDS Core's CSS-only approach — no JavaScript needed.
Use case / user story
As a developer, I want pagination to automatically adapt to mobile viewports so that I don't need to implement viewport detection logic or serve different markup per breakpoint.
Primary audience
Front-end developers
Is this already in the HDS Figma library?
🟡 Partially — some elements exist but not complete
Figma reference
The HDS Figma Pagination page shows simplified pagination annotated "For mobile pagination" but doesn't include explicit responsive breakpoint specs.
Implementation maturity
🔍 Seen elsewhere — exists in another design system or library (not NASA)
Prior art details
Not sure if responsive pagination switching has been implemented on NASA.gov or any live NASA sites. Some design systems (e.g., Carbon, Spectrum) handle this at the JS framework level rather than pure CSS.
Relationship to USWDS
Extends USWDS with something it doesn't provide
Potential breaking change?
No — purely additive
Alternatives considered
Additional context
.hds-pagination__simplified-btncomposed buttons), so this can't be done with CSS alone on a single markup tree — both need to be in the DOMdisplay: none(notvisibility: hidden) so screen readers don't encounter duplicate navigation$theme-pagination-breakpointsetting which controls when full pagination displays — this could potentially be leveragedWould you contribute to this?
Partially — I could help with design/research/testing
Beta Was this translation helpful? Give feedback.
All reactions