# KanbanApi (@salmonui/kanban)

> The KanbanApi interface of @salmonui/kanban: Commands props cannot express (ref).

Canonical: https://salmonui.dev/docs/reference/kanban/KanbanApi

```ts
import type { KanbanApi } from '@salmonui/kanban';
```

Entry index: https://salmonui.dev/docs/reference/kanban (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/kanban.md).

## Reference

Kind: interface

```ts
interface KanbanApi {
    readonly element: HTMLDivElement | null;
    focusCard(id: KanbanKey): void;
    scrollToCard(id: KanbanKey): void;
    openEditor(id: KanbanKey | 'new', at?: Partial<KanbanCellRef>): void;
    closeEditor(): void;
}
```

Commands props cannot express (`ref`).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `element` | `readonly element: HTMLDivElement \| null;` |  |  |
| `focusCard` | `focusCard(id: KanbanKey): void;` |  | Moves focus (the board's tab stop) to a card, scrolling it into view. |
| `scrollToCard` | `scrollToCard(id: KanbanKey): void;` |  | Scrolls a card into view without focusing it. |
| `openEditor` | `openEditor(id: KanbanKey \| 'new', at?: Partial<KanbanCellRef>): void;` |  | Opens the editor for a card, or a new card in `at` (default: the first column). |
| `closeEditor` | `closeEditor(): void;` |  |  |
