getCardShape
Returns the default CardShape object. Use it as a starting point for the card prop when you want to keep the standard sections and only add or remove a few.
Usage
function getCardShape(): CardShape;
The returned shape enables these sections by default:
| Section | Default |
|---|---|
priority | true |
progress | true |
description | true |
deadline | true |
tags | true |
All other sections (cover, users, attachments, comments, menu) are absent (falsy) in the default shape.
Example
<script>
import { Kanban, getCardShape } from "@svar-ui/svelte-kanban";
const users = [
{ id: 1, label: "Alice", img: "/avatars/alice.png" },
{ id: 2, label: "Bob" },
];
const card = {
...getCardShape(),
users: { data: users },
menu: true,
};
</script>
<Kanban {cards} {columns} {card} />
Related
- Cards guide — section visibility and per-section options
- card — the CardShape prop on Kanban
- getEditorItems — builds editor fields from the card shape