GhostBoard reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless board over app-owned columns and cards: columns render as headed sections and cards as ordered lists inside one named, focusable scroll region. Each movable card offers a native Move to… button that opens a modal dialog with Column and Position fields; confirming calls requestMove once with stable IDs ({ cardId, fromColumnId, toColumnId, placement }) and the application answers accepted, after applying the move to its records, or rejected with a reason that stays visible. The board never sorts, clones or mutates records, keeps focus on a card by ID through reorders, and announces outcomes. Direct dragging is not included.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
cards | readonly TCard[] | — | Yes | App-owned cards. Order within a column is array order. Never sorted, filtered, cloned or mutated. |
columns | readonly BoardColumn[] | — | Yes | App-owned columns. Column order is array order. Never sorted, cloned or mutated. |
describeMove | ((request: BoardMoveRequest, card: TCard) => BoardMoveNotice | undefined) | — | No | Guidance shown for the current complete, changed choice before confirmation. Synchronous and free of side effects; re-evaluated reactively. |
headingLevel | BoardHeadingLevel | 3 | No | Level of each column heading. |
messages | Partial<BoardMessages> | — | No | Overrides for labels, descriptions and announcements. |
moveTransition | string | — | No | Class prefix for animating reorders within a column: `<prefix>-move` is applied while a card slides from its previous on-screen position. |
portalTo | GhostPortalTarget | "body" | No | Teleport target for the dialog and its select lists, so they can render inside a theme scope. |
requestMove | ((request: BoardMoveRequest) => BoardMoveOutcome | PromiseLike<BoardMoveOutcome>) | — | No | Makes the board movable: called once per confirmed, changed move and answered with an outcome or a promise of one. Without it no card offers Move to…. |
suggestPlacement | ((context: BoardPlacementContext<TCard>) => BoardPlacement | undefined) | — | No | Initial placement each time a destination column is chosen. An invalid or missing suggestion falls back to the current position in the card's own column and to the end of any other column. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
card | Card content. May hold the app's own links and buttons. Bindings: `BoardCardSlotProps<TCard>` (`card`, `position`, `pending`, `moveError`). Default: `card.title`. |
columnEmpty | Content of a column with no cards. Default: `messages.emptyColumn`. |
columnHeading | Column heading content. Must render text; it names the column. Default: the title and count. |
empty | Content of the scroll region when `columns` is empty. |
Slot props: card
None declared.
Slot props: columnEmpty
| Name | Type | Description |
|---|---|---|
column | BoardColumn | The app's column record, unchanged. |
count | number | Number of cards supplied for the column. |
Slot props: columnHeading
| Name | Type | Description |
|---|---|---|
column | BoardColumn | The app's column record, unchanged. |
count | number | Number of cards supplied for the column. |
Slot props: empty
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
announce | (message: string) => void | Sends a polite message through the board's status element. |
focusCard | (id: BoardCardId) => boolean | Moves focus to the card's Move to… button, or to the card itself when it has none, and scrolls it into view. `false` when the card is not shown. |
openMove | (id: BoardCardId, initial?: import('./ghost-board').BoardMoveInitial) => boolean | Opens Move to… for the card, as its button does, so an app menu or shortcut can start a move. `initial` preselects a destination column and optionally a placement; it is validated like a suggestion and still needs confirmation. `false` when the card is not shown, is not movable, `requestMove` is not bound, or a dialog is already open. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Outer element. Consumer class and style land here. |
data-part | region | The named role="region" scroll surface (tabindex="0"). Every other fallthrough attribute, including aria-label or aria-labelledby, lands here. Lay out columns with CSS on this part. |
data-part | column | A column <section> named by its heading (tabindex="-1" for focus recovery only). |
data-part | column-heading | The column heading (h3 by default; headingLevel). Holds the columnHeading slot. |
data-part | column-count | Default count text inside the heading. |
data-part | cards | The <ol> of a column with cards. An empty column renders no list. |
data-part | card | A card <li> (tabindex="-1" for programmatic focus only). |
data-part | card-content | Wrapper of the card slot. |
data-part | move-button | Native Move to… button after the card content. Its name is the visible label plus the card title. |
data-part | move-status | Pending text or a late rejection reason on the card; describes the Move to… button. |
data-part | column-empty | Content of a column with no cards (columnEmpty slot). |
data-part | status | Visually hidden polite status element; one in the root and one inside the dialog. |
data-ghost-board | present | Present on the root. |
data-card-id | present | On cards: the card ID. |
data-column-id | present | On columns: the column ID. |
data-empty | present | Present on a column with no cards. |
data-movable | present | Present on cards that offer Move to…. |
data-pending | present | Present on a card while a request for it is outstanding. |
data-move-error | present | Present on a card with a rejection that arrived after its dialog closed. |
data-board-part | dialog, column-field, position-field, move-notice, move-error, move-confirm, move-cancel | On the roots of the reused dialog, field, alert and button parts, which keep their own data-part. |
data-board-dialog | present | On the dialog content: an ID that ties the teleported dialog to its board. |
data-board-list | column, position | On the Column and Position select lists, which are teleported with portalTo. |
data-tone | info, warning | On the move notice: the tone describeMove returned. |
data-current | present | On the Position option that matches where the card already is. |
CSS variables
None declared.
Accessibility
Role: region. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/.
Required ARIA attributes: aria-label, aria-labelledby, aria-describedby, aria-busy.
Keyboard
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Passed | Every declared key maps to a Chromium browser test that CI runs and requires to pass on every commit. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
board/triage
Themed card content in a headless board. Move to… reorders within a column with the motion tokens, moves a card before another card or into an empty column, and shows a rejected save with its reason while the dialog stays open.
board/move-to
The headless board renders the application's columns and cards. Move to… requests a placement by stable IDs; the application applies it, rejects it with a reason, or reorders cards on its own.