A headless React component that lets you control how visible and overflown items are rendered ๐Ÿ‘€

Overview

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}
    />
  );
}
You might also like...

Take back control of your email.

UNSUB Take back control of your email. Follow @_heyglassy for updates. This is a Next.js project bootstrapped with create-next-app. Tech Stack inspire

Jul 28, 2022

Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more access

Dec 30, 2022

This simple and small react component can check your repository stars and change theme on light/dark

This simple and small react component can check your repository stars and change theme on light/dark

Repository metrics for react This beauty and easy (4KB) react component can help you add metrics to your repositories also you can change component th

Jun 25, 2022

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil ยท Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Jan 8, 2023

Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS.

Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS.

React Table + Tailwind CSS = โค๏ธ Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS. Both parts

Jan 7, 2023

Accessible, unstyled, open-sourced, and fully functional react component library for building design systems

DORAI UI Accessible, unstyled, open-sourced and fully functional react component library for building design systems Documentation site coming soon St

Dec 30, 2022

React Native's Global Alert Component that can be fully customized and without the need of a state.

React Native's Global Alert Component that can be fully customized and without the need of a state.

๐Ÿšฉ React Native Easy Alert React Native Easy Alert Component. Watch on youtube Easy Alert example app. React Native's Global Alert Component that can

Feb 21, 2022

๐Ÿ““ The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

๐Ÿ““ The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

Build bulletproof UI components faster Storybook is a development environment for UI components. It allows you to browse a component library, view the

Jan 4, 2023
Comments
  • Responsive flex layout works abnormally

    Responsive flex layout works abnormally

    https://codesandbox.io/s/react-overflow-list-flex-error-u2b26?file=/src/App.tsx

    When the current overflow container has no fixed size, the element will change the width of other containers

    opened by StringKe 3
Detect when an element is becoming visible or hidden on the page.

React Visibility Detect when an element is becoming visible or hidden on the page. Installation npm install reactjs-visibility โš ๏ธ This plugin uses the

Md Raihan 26 Oct 31, 2022
โœจ Create server-rendered universal JavaScript applications with no configuration

Universal JavaScript applications are tough to setup. Either you buy into a framework like Next.js or Nuxt, fork a boilerplate, or set things up yours

Jared Palmer 11k Jan 7, 2023
โšก Pcode lets you create and share beautiful images ๐ŸŽ‰ of your source code ๐Ÿš€

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: ya

pcode 33 Jul 14, 2022
JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. ๐Ÿš€

JSON Hero makes reading and understand JSON files easy by giving you a clean and beautiful UI packed with extra features.

JSON Hero 7.2k Jan 9, 2023
A plugin that lets you override the Webpack modules public path in webpage runtime.

dynamic-public-path-plugin A plugin that lets you override the Webpack modules public path in webpage runtime. plugin : webpack-runtime-public-path-pl

dxh_vip 4 Jan 25, 2022
Purple haze is a TypeScript, Markdown, JS generative bundler that works in headless browser

Purple haze Inspired by generative programming and weed :). So I was learning Elm language at home usually in the evening and now I am missing all thi

Aexol 6 Nov 13, 2022
A react component available on npm to easily link to your project on github and is made using React, TypeScript and styled-components.

fork-me-corner fork-me-corner is a react component available on npm to easily link to your project on github and is made using React, TypeScript and s

Victor Dantas 9 Jun 30, 2022
React tooltip is a React.JS Component that brings usefull UX and UI information in selected elements of your website.

React Tooltip โœ… React tooltip is a React.JS Component that brings usefull UX and UI information in elements of your website. Installation โŒจ๏ธ React Too

Marc Ramos 1 Dec 22, 2021
To eleventy and beyond! The all-in-one tool for templates where you want them, component frameworks where you need them ๐Ÿš€

Slinkity ?? This project is heavily under construction! ?? As excited as you may be, we don't recommend this early alpha for production use. Still, gi

Benjamin Holmes 398 Dec 27, 2022
An inventory and financial control system created in Next.js and Redux

An inventory and financial control system created in Next.js and Redux

Marcos Andre 25 Nov 10, 2022