Socket
Socket
Sign inDemoInstall

react-virtual-kanban

Package Overview
Dependencies
43
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-virtual-kanban

A Kanban component in React


Version published
Weekly downloads
2
decreased by-89.47%
Maintainers
1
Install size
8.67 MB
Created
Weekly downloads
 

Changelog

Source

0.2.0

Added itemCacheKey prop to be able to specify a custom key for caching Item components. This comes handy if underlaying Item data changes (like a title) and needs to be re-rendered to reflect new height.

Added scrollToList and scrollToAlignment to set kanban scroll to desired list.

Fixed items not being refreshing when moving lists around.

Updated package.json and added some badges to the README.

Readme

Source

React Virtual Kanban

NPM version NPM license Travis CI status

A Kanban component in React.

Demo available here: https://edulan.github.io/react-virtual-kanban/

Features

  • Fully virtualized
  • Built-in drag and drop support
  • Dynamic heights
  • Custom Item and List components

Installation

Via npm:

npm install react-virtual-kanban --save

Usage

Basic example

import React from 'react';
import ReactDOM from 'react-dom';
import { VirtualKanban } from 'react-virtual-kanban';

// Import only once
import 'react-virtual-kanban/lib/styles.css';

// Declare lists with the following structure
const lists = [
  {
    id: 'list#1',
    rows: [
      {id: 'item#1'},
      {id: 'item#2'},
      {id: 'item#3'},
      {id: 'item#4'}
    ]
  },
  {
    id: 'list#2',
    rows: [
      {id: 'item#5'},
      {id: 'item#6'},
      {id: 'item#7'},
      {id: 'item#8'}
    ]
  },
  {
    id: 'list#3',
    rows: [
      {id: 'item#9'},
      {id: 'item#10'},
      {id: 'item#11'},
      {id: 'item#12'}
    ]
  }
];

ReactDOM.render(
  <VirtualKanban
    lists={lists}
    width={800}
    height={600}
    listWidth={200}
  />,
  document.getElementById('root')
);

API

PropertyTypeDefaultDescription
listsArray[]Array of lists to be rendered
widthNumberThe width of the kanban board
heightNumberThe height of the kanban board
listWidthNumberWidth of each list
listComponentFunctionListList decorator component
itemComponentFunctionItemItem decorator component
itemPreviewComponentFunctionItemPreviewItem preview decorator component
listPreviewComponentFunctionList preview decorator component
onMoveRowFunctionMove row callback
onMoveListFunctionMove list callback
onDropRowFunctionDrop row callback
onDropListFunctionDrop list callback
overscanListCountNumber2Number of lists to render before/after the visible part
overscanRowCountNumber2Number of row items to render before/after the visible part
itemCacheKeyFunctionidKey generator function for caching Item components

TODO

  • Auto scrolling
  • Performance++
  • Doc and examples
  • Integration with state managers (Redux, Mobx...)
  • Animations

Keywords

FAQs

Last updated on 03 Mar 2017

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