# Kanban

[Live-demo](https://kanban.directual.app/)

<figure><img src="https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4Nnmtk9_gFGWOddsf6%2Fuploads%2F7ZJfIyqVW0O3mLjGpCuU%2Fkanban_final.gif?alt=media&#x26;token=32ff99e2-2b89-467c-a6ff-4075f7c310f5" alt=""><figcaption></figcaption></figure>

## Component Overview

The Kanban component serves several purposes:

* Display data
* Edit data (including drag and drop between stages-columns)
* Support role-based access control.

### Step 1. Configuring API-endpoint

<figure><img src="https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4Nnmtk9_gFGWOddsf6%2Fuploads%2FMrEgKdB2pJ8HYY1yoyID%2F1.jpg?alt=media&#x26;token=af8bfd9e-2ea2-488d-9c89-5552f4cde72a" alt=""><figcaption></figcaption></figure>

Choose the endpoint, which includes the following fields:

* **Stage (column)** — a `link` field, linked with a directory structure
* **Weight** — a `decimal` field. Sorting within a column from small to large ↓. As soon as the user dragged an item the weight is saved from 0 to N for the whole column.

{% hint style="info" %}
If you want to drag and drop objects, `ID`, `weight` and `stage` fields have to be available both for reading and writing.&#x20;
{% endhint %}

### Step 2. Configuring Kanban

<figure><img src="https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4Nnmtk9_gFGWOddsf6%2Fuploads%2F8zbaJKyIdUF86Q8K8SMo%2F2.jpg?alt=media&#x26;token=f7c73eb7-d79c-4ce2-a086-40059a66ca80" alt=""><figcaption></figcaption></figure>

1. Choose the stage (column field)
2. Choose weight field
3. Choose enable or disable drag and drop
4. Click "Reset the list" to get the stages from the linked data structure (that is a kind of directory)

<figure><img src="https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4Nnmtk9_gFGWOddsf6%2Fuploads%2F9s61iQnFpttFpalMZovA%2F3.jpg?alt=media&#x26;token=6f28929a-ccfe-40da-a9cd-d71d60d7e111" alt=""><figcaption><p>Stages directory data structure</p></figcaption></figure>

### Step 3. Configure Cards View and Actions

Follow the same principles as in the [Cards component](https://readme.directual.com/web-pages/components/legacy-components/cards).
