Socket
Socket
Sign inDemoInstall

react-overflow-list

Package Overview
Dependencies
40
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-overflow-list

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


Version published
Weekly downloads
31K
increased by10.17%
Maintainers
1
Install size
7.80 MB
Created
Weekly downloads
 

Readme

Source

react-overflow-list

A hooks based implementation of the OverflowList component from Blueprint JS.

ezgif-3-b0d519eb63c8

Installation

yarn add react-overflow-list

Basic Usage

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

const ItemRenderer = (item, index) => {
  return <span key={index}>{item}</span>;
};

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

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

  return (
    <OverflowList
      collapseFrom="end"
      minVisibleItems={0}
      items={items}
      itemRenderer={ItemRenderer}
      overflowRenderer={OverflowRenderer}
    />
  );
}

FAQs

Last updated on 24 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc