無限スクロール

コンテナの下部付近にスクロールすると自動的にコンテンツを追加読み込み。 シームレスなRails連携のためにTurbo Framesと自然に連動します。IntersectionObserverによる 自動読み込みと手動の「さらに読み込む」ボタンモードに対応しています。

プレビュー & コード

オプション

名前 デフォルト 説明
url * String 必須 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

変更履歴 v1.0.0

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

フルアクセスを取得

このコンポーネントと他のすべてのソースコードをアンロックしましょう。一回のお支払いで永久アクセス。

今すぐアクセスを取得