Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattrothenberg/react-overflow-list

A headless React component that lets you control how visible and overflown items are rendered 👀
https://github.com/mattrothenberg/react-overflow-list

list overflow react resize

Last synced: about 2 months ago
JSON representation

A headless React component that lets you control how visible and overflown items are rendered 👀

Awesome Lists containing this project

README

        

# react-overflow-list

A hooks based implementation of the `OverflowList` component from [Blueprint JS](https://blueprintjs.com/docs/#core/components/overflow-list).

![ezgif-3-b0d519eb63c8](https://user-images.githubusercontent.com/5148596/134089559-81de1a38-06cd-4c84-8dd4-0937ca040edc.gif)

## Installation

```
yarn add react-overflow-list
```

### Basic Usage

```jsx
import { OverflowList } from 'react-overflow-list';

const ItemRenderer = (item, index) => {
return {item};
};

const OverflowRenderer = (items) => {
return + {items.length} more;
};

export function App() {
const [items] = React.useState(['Apple', 'Banana', 'Orange']);

return (

);
}
```