Vue page composition

From Esposter/Esposter · View interactive version

Vue page composition is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when decomposing a page, building a list/table of repeated items, wiring row or menu actions, or mounting a dialog for list items. Esposter's page and list composition — how a page and a list are assembled from components, and which component owns each action, item and overlay.

How to use this skill

Skill file

Vue Page & List Composition (Esposter)

How pages and lists are assembled from components. How an individual component is _written_ — shell primitives, generics, slots, props, emits, naming — is the vue-component-patterns skill's.

Settled — do not re-propose

Deep dives

Page Decomposition — Pages are Layout + Composition

A page is layout and composition only — <Head>, page metadata and sub-components; a ref, computed or handler belonging to one element moves into that element's component, and a constant array goes to services/<domain>/ (references/page-decomposition.md).

Maximal Component Granularity — One Action per Component

One component per action: a row reduces to layout, a menu and its items are one unit, and a v-for item with logic of its own is its own component, while buttons that are genuinely one logic, rendered from one config array, stay one v-for (references/granularity.md).

List Item Rendering: Array + v-for over Hardcoded Items

Three or more items with one shape — two once they will grow or carry non-trivial props — are a PascalCase array in services/<domain>/ rendered with v-for, a reactive one a computed, and a value set with no extra data iterated directly (references/list-items.md).

One Affordance Per Action — No Duplicate Behaviour

Every action has exactly one visible control — keep the largest hit target with the least chrome; a second trigger for one command list, a genuinely different behaviour and a banner's own stop control are not duplicates (references/one-affordance.md).

Settings Tab Permissions — Hide at the Tab Level

A permission-gated settings tab is hidden, never shown with an insufficient-permissions message (references/action-items.md, "Settings tabs hide at the tab level").

Singleton Dialogs — Store-Driven Target, Never Per-Item

Never mount a dialog (or any heavy overlay subtree) inside a list item. One instance is mounted at list level and driven by a target ref in a per-service dialog store; the three-part wiring is in references/singleton-dialogs.md, and the rationale in openspec/specs/architecture/singleton-dialogs/design.md.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.