# cui-virtual-list
**Repository Path**: cqb325/cui-virtual-list
## Basic Information
- **Project Name**: cui-virtual-list
- **Description**: cui-virtual-list
- **Primary Language**: NodeJS
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2023-06-28
- **Last Updated**: 2023-10-27
## Categories & Tags
**Categories**: Uncategorized
**Tags**: CUI, cui-solid, virtual-list, solid-js
## README
CUI-Virtual-List
A simple vertical Virtual List based on solidjs
[](https://www.npmjs.org/package/cui-virtual-list)
[](https://npmjs.org/package/cui-virtual-list)
[](https://npmjs.org/package/cui-virtual-list)

## Demo
[Demo](https://cqb325.gitee.io/cui-solid-doc/#/other/virtuallist "demo")
## Props
// fixed height of container, choose between height/maxHeight
height?: number
// max height of container, choose between height/maxHeight
maxHeight?: number
// item estimated size, use to initialization content height
itemEstimatedSize: number
// prev or next number of items to show
overscan?: number,
// list data
items: any[]
## Example
export const createArray = (count: number) => {
return new Array(count).fill(true).map(() => 1 + Math.round(Math.random() * 20))
};
export const ListItem = (props: any) : JSXElement => {
const style = {...props.style}
return
{new Array(props.item).fill(true).map(() => 'Row').join(" ")} Row {props.index}
}
{ListItem}
## Install
# npm
npm install cui-virtual-list
# yarn
yarn add cui-virtual-list