Skip to main content

history

PRO

The functionality is available in PRO Edition only

Enables the local history subsystem. When true, mutating actions (add-card, update-card, move-card, duplicate-card, delete-card) push snapshots onto a history stack, and the undo / redo actions become functional.

Usage

history?: boolean;

Default: false

Example

Board with history and toolbar undo/redo buttons:

<script setup>
import { Kanban, Toolbar } from "@svar-ui/vue-kanban";
import { ref } from "vue";

const columns = [
{ id: "todo", label: "To Do" },
{ id: "doing", label: "In Progress" },
{ id: "done", label: "Done" },
];
const cards = ref([]);
const api = ref(null);
</script>

<template>
<Toolbar :api="api" undo />
<Kanban
ref="api"
:cards="cards"
:columns="columns"
:history="true"
/>
</template>
  • Undo and redo guide - enabling history, toolbar integration, and custom shortcuts
  • undo - revert the last card mutation
  • redo - re-apply the last undone change
  • Toolbar - exposes undo/redo buttons