Vanilla Breeze

quadrant-grid

Generic 2x2 quadrant grid primitive backing SWOT, stakeholder maps, and any custom 2x2 visualization.

Overview

The <quadrant-grid> component renders a configurable 2x2 grid with axis labels, low/high markers, and four titled quadrants. Children are placed by either data-quadrant (explicit bucket) or data-x / data-y (normalized coordinates that compute to the matching quadrant and pin the child as a labelled dot). Optional drag-and-drop via the draggable attribute composes <drag-surface>.

This is the primitive that backs SWOT, stakeholder-map, and other 2x2 patterns — it replaces three previously-proposed standalone components with one configurable element plus recipes.

Cartesian convention

Quadrant indices follow Cartesian numbering. q1 is top-right, q2 top-left, q3 bottom-left, q4 bottom-right:

Use data-quadrant="0".."3" on children to bucket them, or set data-x / data-y in [0..1] and the component computes the quadrant.

Attributes

Child attributes

SWOT recipe

SWOT analysis is just a quadrant-grid with appropriate axis labels and quadrant titles. No new component required.

Stakeholder Map recipe

Power × Interest grid with labelled dots positioned at exact coordinates via data-x / data-y.

Drag-and-drop

Add the draggable attribute to enable moving children between quadrants. Each quadrant becomes a <drag-surface>; the component listens for cross-surface transfers and emits quadrant-grid:move.

Progressive Enhancement

The component layers cleanly:

  1. HTML. Static fallback content (a <dl> of quadrant titles or children with data-quadrant) remains visible without JS or CSS.
  2. CSS. The :not(:defined) selector keeps the host visible pre-upgrade; once defined, the grid layout applies.
  3. JS. Adds axis labels, computes quadrants for data-x / data-y children, wires drag-and-drop when requested, and fires quadrant-grid:move.

Accessibility

The grid host is a <section role="region"> with an axis-derived label. Each quadrant is its own <section> with an aria-label. Move events update a polite live region announcing the new quadrant.

Related

  • <impact-effort> — Specialized 2x2 with hardcoded Quick Wins / Big Bets / Fill-Ins / Money Pit labels and stable public API. Keeps its own surface; quadrant-grid covers other 2x2 use cases.
  • <empathy-map> — UX research 2x2 with persona context and emotion tagging. Domain-specific.
  • <drag-surface> — DnD primitive composed when draggable is set.