UxShowMore

components/ux/ShowMore.vue

Canonical overflow control for capped lists: "Show all N" / "Show more (cap of N)" expands in place, "Only show top N" collapses, and past expandCap a hairline-separated hand-off link ("View all N →") routes to a full listing page — or a muted "+N more" count when no listing backs the list.

ToolCallstool_1
400
tool_2
200
tool_3
133
tool_4
100
tool_5
80
Scenarios
Fits within expandCap — plain expand/collapse
Beyond expandCap, listing page behind it — hand-off link after the hairline
View all 312 →
Beyond expandCap, no listing page — muted overflow count
+37 more
Under rowCap — control renders nothing
(nothing to show — 4 ≤ rowCap)
components/ux/ShowMore.vue

Usage

<UxShowMore :total = "—" :rowCap = "—" :expandCap = "—" :expanded = "—" to = "undefined" />

Props

PropTypeDefaultDescription
totalNumberFull (unsliced) row count of the capped list
rowCapNumberRows shown collapsed; control hides at or under this
expandCapNumberRows shown expanded; past this the hand-off link/count appears
expandedBooleanCurrent expansion state (owned by the parent)
toStringundefinedListing-page URL for the overflow hand-off, already filtered if needed; absent renders "+N more"

Events

EventDescription
toggleExpand/collapse requested — parent flips `expanded` and re-slices its rows

Related

Qpoint Brand Style Guide