Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lourenci/react-kanban

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lourenci/react-kanban

A <ReactKanban /> for React Hooks

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
increased by17.92%
Maintainers
1
Weekly downloads
 
Created
Source

Maintainability Test Coverage Build Status JavaScript Style Guide

Yet another Kanban/Trello board like lib for React.

❓ Why?

  • 👊 Reliable: 100% tested on CI; 100% coverage; 100% SemVer.
  • 🎮 Having fun: Play with Hooks 🎣 and Styled Components 💅🏻.

🛠 Install and usage

Install the lib and the dependency on your project:

yarn add @lourenci/react-kanban styled-components

Import the lib and use it on your project:

import Board from '@lourenci/react-kanban'

const board = {
  lanes: [
    {
      id: 1,
      title: 'Backlog',
      cards: [
        {
          id: 1,
          title: 'Add card',
          description: 'Add capability to add a card in a lane'
        },
      ]
    }
    {
      id: 2,
      title: 'Doing',
      cards: [
        {
          id: 2,
          title: 'Drag-n-drop support',
          description: 'Move a card between the lanes'
        },
      ]
    }
  ]
}

<Board
  onCardDragEnd={() => {}}
>
  {board}
</Board>

🔥 API

⚙️ Props

PropDescription
children (required)The board to render
onCardDragEndCallback that will be called when the card move ends
children
const board = {
  lanes: {
    id: ${laneId},
    cards: {
      id: ${cardId},
      title: ${cardTitle},
      description: ${cardDescription}
    }
  }
}
OnCardDragEnd

When the user moves a card, this callback will be called passing these parameters:

ArgDescription
boardThe modified board
sourceAn object with the card source { laneId, index }
destinationAn object with the card destination { laneId, index }
Source and destination
PropDescription
laneIdIn source: lane source id; In destination: lane destination id;
indexIn source: card's index in lane source's array; In destination: card's index in lane destination's array;

🤝 Contributing

PRs are welcome. Just fork this project, setup it:

$ yarn
$ yarn start

and open the PR.

Guidelines for contributing

  • You need to test your change.
  • Try to be clean on your change. CodeClimate will keep an eye on you.
  • It has to pass on CI.

🤖 Contributors

Thanks goes to these wonderful people (emoji key):

Leandro Lourenci
Leandro Lourenci

💬 🐛 💻 📖 💡 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

FAQs

Package last updated on 06 Apr 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc