{"id":20983841,"url":"https://github.com/derhowie/scrollsync","last_synced_at":"2025-05-14T17:30:22.969Z","repository":{"id":62434589,"uuid":"80242503","full_name":"derHowie/scrollsync","owner":"derHowie","description":"A reagent component for managing scroll events powered by core.async.","archived":false,"fork":false,"pushed_at":"2017-04-10T00:41:12.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T20:44:37.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derHowie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-27T20:16:02.000Z","updated_at":"2018-01-18T21:08:13.000Z","dependencies_parsed_at":"2022-11-01T21:15:49.916Z","dependency_job_id":null,"html_url":"https://github.com/derHowie/scrollsync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derHowie%2Fscrollsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derHowie%2Fscrollsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derHowie%2Fscrollsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derHowie%2Fscrollsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derHowie","download_url":"https://codeload.github.com/derHowie/scrollsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254194682,"owners_count":22030427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T05:50:28.038Z","updated_at":"2025-05-14T17:30:22.713Z","avatar_url":"https://github.com/derHowie.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scrollsync\n\nA reagent component for managing scroll events powered by core.async.\n\n## Usage\n\n[![Clojars Project](https://img.shields.io/clojars/v/scrollsync.svg)](https://clojars.org/scrollsync)\n\nScrollsync fires events based on the positioning of a collection of elements with respect to the browser window.\n\n```clojure\n(:require [reagent.core :as r]\n          [scrollsync.core :refer [scrollsync])\n\n(defn some-content\n  []\n  [:div\n    [:div {:id \"one\"}\n     [:p \"lorem\"]]\n    [:div {:id \"two\"}\n     [:p \"ipsum\"]]\n    [:div {:id \"three\"}\n     [:p \"dolor\"]]])\n\n(defn my-scrollsync-view\n  []\n  [scrollsync :bp-fn       #(.log js/console %)\n              :content     some-content\n              :breakpoints [{:id \"one\"\n                             :params \"lorem!!!\"\n                             :break-at 100}\n                            {:id \"two\"\n                             :params \"ipsum!!!\"\n                             :break-at 150}\n                            {:id \"three\"\n                             :params \"dolor!!!\"\n                             :break-at 75}]]\n```\n\n## Parameters\n\n### :bp-fn\n\n`fn`\n\nThe function fired when a breakpoint is reached.\n\n### :breakpoints\n\n`[{:id \"some-id\" :params {:a \"b\"} :break-at 100}...]`\n\nA collection of maps describing each element with a scroll event.\n\n#### :id\n\nthe element's id\n\n#### :params\n\nthe data passed to `bp-fn` when the breakpoint is reached\n\n#### :break-at\n\nthe offset at which the element's breakpoint is triggered (an offset of 0 would fire an event when the top of the element reaches the top of the viewport)\n\n### :content\n`component`\n\nscrollsync's child element\n\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhowie%2Fscrollsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderhowie%2Fscrollsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhowie%2Fscrollsync/lists"}