Vertical Overflow
A constrained height exposes a faded bottom edge and a full-width show-more button. Each click advances the list by one page minus the fade distance.
- Riyadh
- Jeddah
- Mecca
- Medina
- Dammam
- Khobar
- Taif
- Tabuk
- Abha
- Buraydah
- Khamis Mushait
- Hail
<div class="nds-scroll-more" style="--scroll-max-height: 240px;">
<ul class="nds-scroll-more-content nds-list">
<li>Riyadh</li>
<li>Jeddah</li>
<li>Mecca</li>
<li>Medina</li>
<li>Dammam</li>
<li>Khobar</li>
<li>Taif</li>
<li>Tabuk</li>
<li>Abha</li>
<li>Buraydah</li>
<li>Khamis Mushait</li>
<li>Hail</li>
</ul>
<button class="nds-btn nds-subtle nds-md nds-show-more" type="button" aria-label="Show more">
<span class="nds-label">Show more</span>
<i class="nds-icon nds-hgi-arrow-down-01" aria-hidden="true"></i>
</button>
</div>
Horizontal Overflow
A row that exceeds its container fades on both inline edges. The button spans full height with a vertically written label and scrolls one page per click.
<div class="nds-scroll-more" style="--scroll-max-width: 480px;">
<div class="nds-scroll-more-content nds-flex">
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">All</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Healthcare</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Education</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Transport</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Housing</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Employment</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Commercial</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Tourism</span></button>
<button class="nds-btn nds-subtle nds-sm"><span class="nds-label">Utilities</span></button>
</div>
<button class="nds-btn nds-subtle nds-md nds-show-more" type="button" aria-label="Show more">
<i class="nds-icon nds-hgi-arrow-down-01" aria-hidden="true"></i>
</button>
</div>
Horizontal Card Track
A row of cards in a grid track that exceeds its container, producing a horizontal overflow, dual-edge fade, and a full-height show-more button beside the track.
Identity Verification
Verify your national identity and obtain digital certificates for government transactions
Passport Renewal
Renew your passport online with expedited processing and home delivery options
Birth Certificate Request
Request official birth certificates and family documentation online
Marriage Contract Registration
Register marriage contracts and obtain official marriage certificates
Driver's License Services
Apply for, renew, or update your driving license information
Vehicle Registration
Register new vehicles, transfer ownership, or renew your vehicle registration
Built-in Features
Activates on any .nds-scroll-more on the page. Overflow detection, scroll listeners, and button handlers attach automatically.
Measures content on both axes and picks vertical or horizontal based on which one overflows. No configuration attribute required.
Fades the scrollable edges to hint at hidden content. The fade adapts to start, middle, and end positions and adjusts for RTL horizontal scroll.
One full item from the previous page stays visible as an anchor on the next click, so users never lose their place when paging through long lists or card tracks.
When the user reaches the end, the button flips its icon and the next click returns the scroll position to the start.
A ResizeObserver on the content re-runs overflow detection when the container or its children change size, so the button appears and disappears as needed.
Passive scroll listener throttled by requestAnimationFrame, with the maximum scroll range cached and refreshed only when layout changes, so touch and trackpad momentum scroll stay smooth.
Re-initialize, manually recheck overflow, or tear down listeners per element through NDS.ScrollMore.
Usage Guidelines
Best Practices
- Use Scroll More when you need to fit a long list, chip row, or card track into a bounded area while preserving full access to every item
- Set
--scroll-max-heightfor vertical lists and--scroll-max-widthfor horizontal rows. Without a size limit the content will not overflow and the button will not appear - Use a single wrapper for either direction; the axis is auto-detected from whichever dimension overflows, so the same markup works for vertical lists and horizontal rows
- Do not use Scroll More for navigational tabs. Use Tabs, which has its own overflow and active-tab tracking
- Do not use Scroll More for nested menus or multi-level navigation. Use Drawer, which handles submenu open/close state
- Do not use Scroll More when a "Show all" affordance is enough and pagination is not needed. Use Expandable Content instead
- Keep the first child uniform in size when you expect item-aware paging. The step is computed from the first child; uneven sizes still work but the "one page at a time" feel is weaker
- Set
--scroll-gapwhen you want visible breathing room between the content and the show-more button. Pair withnds-dividedfor a hairline separator on top of the gap - If children have borders, outlines, or shadows that get clipped by the overflow container, apply inline padding to
.nds-scroll-more-contentto reserve breathing room
Modifier Classes
| Class | Description |
|---|---|
nds-divided | Renders a hairline separator between the content and the show-more button when overflow is present. No child element required |
nds-snap | Applies CSS scroll-snap so each direct child's leading edge aligns with the scroll container. Good for card tracks and large items |
Data Attributes
| Attribute | Description |
|---|---|
data-axis | Set automatically by the JS on .nds-scroll-more. Values: vertical, horizontal. Removed when content does not overflow |
data-state | Managed automatically. Tokens: has-more (overflow present), at-start (scroll position 0), at-end (scroll position max). Drives mask fade and button icon direction |
CSS Custom Properties
| Property | Default | Description |
|---|---|---|
--scroll-max-height | none | Maximum block size of the wrapper. Drives vertical overflow |
--scroll-max-width | none | Maximum inline size of the wrapper. Drives horizontal overflow |
--scroll-fade | 48px | Length of the edge fade gradient on the overflow side(s) |
--scroll-gap | 0 | Gap between the content and the show-more button |
--scroll-divider | --divider-color | Color of the border between content and button |
JavaScript API
The NDS.ScrollMore API exposes initialization and teardown hooks. For dynamically added markup, call NDS.ScrollMore.init() to activate the new instances.