> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pharen.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Kanban

> Importiere und verwende die Kanban-Komponenten aus @pharen/ui.

export const PharenUiPreview = ({name, title = 'Pharen UI component preview'}) => <div className="not-prose my-6 overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm dark:border-white/10 dark:bg-zinc-950">
    <div className="pharen-ui-preview-root" data-pharen-ui-preview data-example={name} role="region" aria-label={title} />
  </div>;

Mit **Kanban** kannst du mit strukturierten operativen Daten zu arbeiten. Diese Seite dokumentiert alle Vue-Komponenten, die das Modul öffentlich exportiert.

<PharenUiPreview name="kanban" title="Kanban Vorschau" />

<Accordion title="Code anzeigen">
  ```vue theme={null}
  <script setup lang="ts">
  import { Kanban, KanbanBoard, KanbanCard, KanbanColumn, KanbanColumnContent, KanbanHeader, KanbanItem } from '@pharen/ui';

  const columns = {
    todo: [{ id: 'brief', title: 'Write project brief' }, { id: 'research', title: 'Research competitors' }],
    done: [{ id: 'scope', title: 'Confirm scope' }],
  };
  </script>

  <template>
    <Kanban :default-value="columns" :get-item-value="item => item.id" class="w-full">
      <KanbanBoard class="sm:grid-cols-2">
        <KanbanColumn v-for="(_, key) in columns" :key="key" :value="key">
          <KanbanHeader class="capitalize">{{ key }}</KanbanHeader>
          <KanbanColumnContent :value="key" class="rounded-lg bg-muted/50 p-2">
            <template #default="{ item }"><KanbanItem :value="item.id"><KanbanCard>{{ item.title }}</KanbanCard></KanbanItem></template>
          </KanbanColumnContent>
        </KanbanColumn>
      </KanbanBoard>
    </Kanban>
  </template>
  ```
</Accordion>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @pharen/ui
  ```

  ```bash pnpm theme={null}
  pnpm add @pharen/ui
  ```

  ```bash yarn theme={null}
  yarn add @pharen/ui
  ```

  ```bash bun theme={null}
  bun add @pharen/ui
  ```
</CodeGroup>

<Note>
  Importiere `@pharen/ui/styles.css` genau einmal im Einstiegspunkt deiner Anwendung.
</Note>

## Verwendung

```ts theme={null}
import { Kanban, KanbanBoard, KanbanCard, KanbanCards, KanbanHeader, KanbanProvider, KanbanColumn, KanbanColumnContent, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay } from '@pharen/ui';
```

## Exporte

| Export                | Aufgabe                                   |
| --------------------- | ----------------------------------------- |
| `Kanban`              | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanBoard`         | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanCard`          | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanCards`         | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanHeader`        | Strukturiert den Kopfbereich.             |
| `KanbanProvider`      | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanColumn`        | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanColumnContent` | Enthält den sichtbaren Inhalt.            |
| `KanbanColumnHandle`  | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanItem`          | Stellt ein einzelnes Element dar.         |
| `KanbanItemHandle`    | Exportierte Vue-Komponente dieses Moduls. |
| `KanbanOverlay`       | Exportierte Vue-Komponente dieses Moduls. |

## Quellcode

[Quellcode auf GitHub öffnen](https://github.com/PharenIT/ELEV8-Labs/tree/main/src/packages/ui/src/components/kanban)
