DataHoverBreakdown

components/data/HoverBreakdown.vue

A pointer-following card that breaks a row's number and drawing down into the items it's made of — a one-line 28 px title with the main datapoint in the upper right, tight context lines, a full-width summary drawing, then the items flowing into columns (down, then across). The card sizes to its content up to maxWidth (default: the window), where the title truncates. Placed above the pointer from its measured height (below when there's no room), always inside the window. Without items it's a plain tooltip. Extracted from design c100 (lever-strip variations).

A pointer-following card that breaks a row's number and drawing down into the items it's made of. Hover a row below — the first is driven by the prop editor; switch on pinned to hold it open while you tune props. Extracted from design c100 (lever-strip variations), where every lens's row hovers into its people.

Interactive · adminProps$3.9k
Legal · empty — no items, a plain tooltipclear
Payments · minimal — 3 rows3
ML Research Platform · long title — grows, then truncates at maxWidth2
Platform · typical — 28 people, columns$3.9k
Contractors · overflow — 80 long names$12.4k
components/data/HoverBreakdown.vue

Usage

<DataHoverBreakdown :x = "required" :y = "required" title = "—" :titleSize = "28" :metric = "metric" :metricSize = "22" :lines = "[]" :items = "[]" footer = "—" :colWidth = "240" :rowsPerCol = "12" :colGap = "28" :plainWidth = "260" :maxWidth = "maxWidth" />

Props

PropTypeDefaultDescription
xNumberrequiredPointer clientX — the card sits 14 px to its right, clamped inside the window
yNumberrequiredPointer clientY — the card sits above it when it fits (so the rows being scanned stay visible), else below
titleString''The hovered thing's name, top left
titleSizeNumber28Title font-size in px
metric{ label, value }nullThe main datapoint — value big and bold in the upper right, its label under it
metricSizeNumber22Datapoint font-size in px
linesString[][]Context lines under the header, 12 px on 16 px leading
itemsArray[]The breakdown, in reading order — each rendered by the #row slot (`key` used when present). Empty → a plain tooltip
footerString''A subtle line under the list — what the columns mean, what's left out
colWidthNumber240Width of one column of rows in px
rowsPerColNumber12Target rows per column; columns = ceil(items / rowsPerCol), capped by the window width
colGapNumber28Gap between columns in px
plainWidthNumber260Max width when there are no items (the plain tooltip)
maxWidthNumbernullCap on the card's width (default: the window). The card sizes to its content — at least its columns, wider for a longer title or footer — up to here, where the one-line title truncates; also caps how many columns fit

Slots

SlotDescription
summaryScope { width } — a drawing over the list spanning every column (width = the list's inner width), e.g. the row's bar at full size, plus a summary line
rowScope { item, index } — one item, laid out in a 16 px flex row (items-center, gap-2): typically a name, its piece of the drawing, a value and an aside

Related

Qpoint Brand Style Guide