Modern virtual and infinite scrolling components for React, React Native, Preact, Vue, and Svelte.
npm install @scrolloop/react
# or
yarn add @scrolloop/react
# or
pnpm add @scrolloop/react
npm install @scrolloop/preact
# or
yarn add @scrolloop/preact
# or
pnpm add @scrolloop/preact
npm install @scrolloop/vue
# or
yarn add @scrolloop/vue
# or
pnpm add @scrolloop/vue
npm install @scrolloop/svelte
# or
yarn add @scrolloop/svelte
# or
pnpm add @scrolloop/svelte
npm install @scrolloop/react-native
# or
yarn add @scrolloop/react-native
# or
pnpm add @scrolloop/react-native
import { VirtualList } from "@scrolloop/react";
function App() {
const items = Array.from({ length: 1000 }, (_, i) => `Item #${i}`);
return (
<VirtualList
count={items.length}
itemSize={50}
height={400}
renderItem={(index, style) => (
<div key={index} style={style}>
{items[index]}
</div>
)}
/>
);
}
import { View, Text } from "react-native";
import { VirtualList } from "@scrolloop/react-native";
function App() {
const items = Array.from({ length: 1000 }, (_, i) => `Item #${i}`);
return (
<VirtualList
count={items.length}
itemSize={50}
renderItem={(index, style) => (
<View key={index} style={style}>
<Text>{items[index]}</Text>
</View>
)}
/>
);
}
MIT