This is a tool which makes scroll-container auto scroll to the bottom easy.
yarn add @yrobot/auto-scroll
import autoScroll from "@yrobot/auto-scroll";
autoScroll({ selector: "#scroll-container-id" });
<script src="https://cdn.jsdelivr.net/npm/@yrobot/auto-scroll/build/index.iife.js"></script>
<script>
autoScroll.default({ selector: "#scroll-container-id" });
</script>
- [✓] The subtree children list length increase
- [✓] The direct child element height increase
es
import autoScroll, { escapeWhenUpPlugin } from "@yrobot/auto-scroll";
autoScroll({
selector: "#scroll-container-id",
plugins: [escapeWhenUpPlugin()],
});
iife
autoScroll.default({
selector: "#scroll-container-id",
plugins: [autoScroll.escapeWhenUpPlugin()],
});