Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/react-component/virtual-list
๐งพ React Virtual List Component which worked with animation
https://github.com/react-component/virtual-list
ant-design antd react react-component
Last synced: 9 days ago
JSON representation
๐งพ React Virtual List Component which worked with animation
- Host: GitHub
- URL: https://github.com/react-component/virtual-list
- Owner: react-component
- License: mit
- Created: 2019-07-05T08:18:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-26T03:28:29.000Z (about 2 months ago)
- Last Synced: 2024-10-29T20:00:29.484Z (14 days ago)
- Topics: ant-design, antd, react, react-component
- Language: TypeScript
- Homepage: https://rc-virtual-list.react-component.now.sh
- Size: 327 KB
- Stars: 726
- Watchers: 6
- Forks: 154
- Open Issues: 70
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rc-virtual-list
React Virtual List Component which worked with animation.
[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Test coverage][coveralls-image]][coveralls-url] [![node version][node-image]][node-url] [![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/rc-virtual-list.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-virtual-list
[github-actions-image]: https://github.com/react-component/virtual-list/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/virtual-list/actions
[coveralls-image]: https://img.shields.io/codecov/c/github/react-component/virtual-list/master.svg?style=flat-square
[coveralls-url]: https://codecov.io/gh/react-component/virtual-list
[node-image]: https://img.shields.io/badge/node.js-%3E=_6.0-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/rc-virtual-list.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-virtual-list## Online Preview
https://virtual-list-react-component.vercel.app/
## Development
```bash
npm install
npm start
open http://localhost:9001/
```## Feature
- Support react.js
- Support animation
- Support IE11+## Install
[![rc-virtual-list](https://nodei.co/npm/rc-virtual-list.png)](https://npmjs.org/package/rc-virtual-list)
## Usage
```js
import List from 'rc-virtual-list';{index =>
{index}}
;
```# API
## List
| Prop | Description | Type | Default |
| ---------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| children | Render props of item | (item, index, props) => ReactElement | - |
| component | Customize List dom element | string \| Component | div |
| data | Data list | Array | - |
| disabled | Disable scroll check. Usually used on animation control | boolean | false |
| height | List height | number | - |
| itemHeight | Item minium height | number | - |
| itemKey | Match key with item | string | - |
| styles | style | { horizontalScrollBar?: React.CSSProperties; horizontalScrollBarThumb?: React.CSSProperties; verticalScrollBar?: React.CSSProperties; verticalScrollBarThumb?: React.CSSProperties; } | - |`children` provides additional `props` argument to support IE 11 scroll shaking.
It will set `style` to `visibility: hidden` when measuring. You can ignore this if no requirement on IE.