Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Infinite Scroll

Container that fires a load event as the reader nears the bottom, with a loading spinner and an end-of-list state.

ComponentsInfinite Scroll
contentinteractive
<arc-infinite-scroll>

Overview

Infinite Scroll wraps your items and puts an Intersection Observer sentinel after them. When the sentinel comes within `threshold` pixels of the bottom of the viewport (200 by default), the component fires `arc-load-more`. Fetch the next batch and append it. A larger `threshold` asks for the next batch earlier. Changing it on a mounted component takes effect at once, and fires `arc-load-more` straight away if the sentinel is already inside the new distance. Set `loading` to `true` while you fetch. A spinner shows in the footer, and no further `arc-load-more` fires until you set `loading` back to `false`. When there's nothing left, set `finished` to `true`. The observer disconnects and the footer shows "No more items". The container sets `aria-busy` while loading. If your items are self-contained entries such as posts, slot them as `<article>` elements and add `role="feed"` to the component for the ARIA feed pattern.

Guidelines

Do

  • Set `loading` to `true` as soon as you start fetching, and back to `false` when the data arrives
  • Set `finished` when the API says there are no more pages
  • Put it inside a scrollable parent, or let the page scroll
  • Append new items as direct children. They render in the default slot

Don't

  • Don't use it for small, fixed datasets. Use pagination or a plain list
  • Don't put footer content below it without another way to reach it. The footer moves down every time items load

Features

  • `disabled` disconnects the observer, blocks pointer events and dims the component to 50% opacity
  • The observer reconnects when `finished` or `disabled` is set back to false

Preview

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-infinite-scroll id="feed" threshold="200">
  <!-- Items appended here -->
</arc-infinite-scroll>

<script>
  const feed = document.getElementById('feed');
  let page = 1;

  feed.addEventListener('arc-load-more', async () => {
    feed.loading = true;
    const items = await fetchPage(page++);
    items.forEach(item => feed.appendChild(createItemEl(item)));
    feed.loading = false;
    if (!items.length) feed.finished = true;
  });
</script>

API

thresholdnumber200
How far below the bottom of the viewport, in pixels, the sentinel after the content can be when arc-load-more fires. Defaults to 200. Read when the observer attaches and again whenever it changes.
loadingbooleanfalse
When true, displays a spinner in the footer and suppresses additional arc-load-more events.
finishedbooleanfalse
When true, disconnects the observer and displays "No more items" text in the footer.
disabledbooleanfalse
Disables the component, disconnects the observer, and reduces opacity to 40%.

Events

arc-load-more
Fired when the scroll sentinel enters the viewport, signaling more content should load

See also