Content v1.0.0

Infinite Scroll

Automatically loads more content when scrolling near the bottom of a container. Works naturally with Turbo Frames for seamless Rails integration. Supports auto-load via IntersectionObserver and manual "Load More" button modes.

Preview & Code

Options

Name Type Default Description
url * String required URL to fetch the next page of content
threshold Integer 200 Pixels from bottom to trigger loading
loading_text String "Loading..." Text shown while loading
end_text String "No more items" Text shown when all content loaded
mode Symbol :auto :auto (IntersectionObserver) or :manual (button)
turbo_frame String Target Turbo Frame ID for content insertion
button_text String "Load More" Button text for manual mode
ended Boolean false Whether all content has been loaded

Changelog v1.0.0

- v1.0.0: Initial release with auto and manual modes

Get Full Access

Unlock the source code for this component and all others. One-time payment for lifetime access.

Get Access Now