# BubbleMatrix

A scan-style scatter of category badges and nodes drawn on a canvas, a decorative we-are-combing-your-data visual sized by category value rather than a precise chart.

Version: 0.2.0-preview.1 (preview)
Content digest: 70ac710f4d22dce040e7ac593379ba8aca9dcb59a0b9c0f839819cae0e2bb721
Contract kind: source-derived
Source: packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.tsx

## Guidance

{
  "summary": "A scan-style scatter of category badges and nodes drawn on a canvas, a decorative we-are-combing-your-data visual sized by category value rather than a precise chart.",
  "guidance": [
    {
      "heading": "Overview",
      "body": "A canvas scan-field of category bubbles — a decorative \"we are combing your data\" visual, not a\nprecise chart."
    },
    {
      "heading": "When to use",
      "body": "Reach for BubbleMatrix as the centerpiece of a scanning or monitoring surface, where the point\nis texture and motion rather than exact reads. Bubble size loosely encodes each `value`,\n`progress` (0-100) positions the scan sweep, and `value` is the headline total.\n\nBecause magnitudes are felt, not measured, pick a different chart whenever the reader needs to\ncompare categories accurately: `CategoryBars` for readable ranked values, `ActionOrbs` for a\nproportional small-set summary. Pick `BurstGraph` when you want a single big center value with\ncategory points radiating out instead of a scan field.\n\nNot currently used in the app."
    }
  ],
  "usage": [],
  "examples": [],
  "source": "packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.mdx",
  "status": "local-preview",
  "note": "Guidance is read from local documentation, originally imported from the frozen source. Platform assertions in guidance are not parity verification."
}

## Contract and public API

```json
{
  "props": [
    {
      "name": "items",
      "type": "readonly CategoryDatum[]",
      "declared_type": "readonly CategoryDatum[]",
      "required": true,
      "description": "Category values used to render axis bubbles and plot dots.",
      "source": {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 86
      }
    },
    {
      "name": "value",
      "type": "number | undefined",
      "declared_type": "number",
      "required": false,
      "description": "Total value highlighted by the scan visualization.",
      "source": {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 88
      }
    },
    {
      "name": "progress",
      "type": "number | undefined",
      "declared_type": "number",
      "required": false,
      "description": "Optional progress value from 0-100 used for static scan positioning.",
      "source": {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 90
      },
      "default": "0",
      "default_kind": "source-expression"
    },
    {
      "name": "ariaLabel",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Accessible label for meaningful chart content.",
      "source": {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 92
      }
    },
    {
      "name": "testId",
      "type": "string | undefined",
      "declared_type": "string",
      "required": false,
      "description": "Optional test selector.",
      "source": {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 94
      }
    }
  ],
  "prop_shapes": {},
  "api": {
    "method": "typescript-type-checker",
    "typescript_version": "5.9.3",
    "public_export": "BubbleMatrix",
    "public_path": "BubbleMatrix",
    "import_path": "@cloakedinc/design-system",
    "root_kind": "component",
    "entrypoints": [
      {
        "name": "BubbleMatrix",
        "signature": 1,
        "visibility": "public",
        "source": {
          "path": "packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.tsx",
          "line": 14
        },
        "props_type": "BubbleMatrixProps",
        "props": [
          {
            "name": "items",
            "type": "readonly CategoryDatum[]",
            "declared_type": "readonly CategoryDatum[]",
            "required": true,
            "description": "Category values used to render axis bubbles and plot dots.",
            "source": {
              "path": "packages/design-system/src/components/visualizations/types.ts",
              "line": 86
            }
          },
          {
            "name": "value",
            "type": "number | undefined",
            "declared_type": "number",
            "required": false,
            "description": "Total value highlighted by the scan visualization.",
            "source": {
              "path": "packages/design-system/src/components/visualizations/types.ts",
              "line": 88
            }
          },
          {
            "name": "progress",
            "type": "number | undefined",
            "declared_type": "number",
            "required": false,
            "description": "Optional progress value from 0-100 used for static scan positioning.",
            "source": {
              "path": "packages/design-system/src/components/visualizations/types.ts",
              "line": 90
            },
            "default": "0",
            "default_kind": "source-expression"
          },
          {
            "name": "ariaLabel",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Accessible label for meaningful chart content.",
            "source": {
              "path": "packages/design-system/src/components/visualizations/types.ts",
              "line": 92
            }
          },
          {
            "name": "testId",
            "type": "string | undefined",
            "declared_type": "string",
            "required": false,
            "description": "Optional test selector.",
            "source": {
              "path": "packages/design-system/src/components/visualizations/types.ts",
              "line": 94
            }
          }
        ],
        "branches": [],
        "constraints": [],
        "extraction_status": "extracted"
      }
    ],
    "type_sources": [
      {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 46,
        "name": "CategoryDatum",
        "code": "export interface CategoryDatum {\n    /** Stable category identifier. */\n    id: string;\n    label: React.ReactNode;\n    /** Non-negative category count or magnitude. */\n    value: number;\n    color?: string;\n}"
      },
      {
        "path": "packages/design-system/src/components/visualizations/types.ts",
        "line": 84,
        "name": "BubbleMatrixProps",
        "code": "export interface BubbleMatrixProps {\n    /** Category values used to render axis bubbles and plot dots. */\n    items: readonly CategoryDatum[];\n    /** Total value highlighted by the scan visualization. */\n    value?: number;\n    /** Optional progress value from 0-100 used for static scan positioning. */\n    progress?: number;\n    /** Accessible label for meaningful chart content. */\n    ariaLabel?: string;\n    /** Optional test selector. */\n    testId?: string;\n}"
      }
    ],
    "defaults_policy": "Only explicit destructured parameter initializers are extracted. Other runtime defaults remain in implementation source."
  },
  "spec": {
    "$schema": "../../../specs/component-spec.schema.json",
    "identity": {
      "name": "BubbleMatrix",
      "status": "preview",
      "version": "1.0.0",
      "summary": "A scan-style scatter of category badges and nodes drawn on a canvas, a decorative we-are-combing-your-data visual sized by category value rather than a precise chart."
    },
    "parts": [
      {
        "id": "canvas",
        "label": "Canvas",
        "description": "The square canvas the scan field is drawn onto.",
        "required": true
      },
      {
        "id": "badge",
        "label": "Category badge",
        "description": "The per-row badge showing a category value."
      },
      {
        "id": "node",
        "label": "Scan node",
        "description": "A dot placed along a row by the sweep."
      },
      {
        "id": "legend",
        "label": "Legend",
        "description": "The category color key beneath the rows."
      }
    ],
    "allowedDesignChoices": {
      "variants": {
        "base": {
          "label": "Base",
          "description": "Category data and progress change the reading without changing the scan treatment."
        }
      },
      "sizes": {}
    },
    "variants": [
      {
        "id": "base",
        "label": "Base",
        "description": "A canvas scan field of badges, nodes, and a legend.",
        "platforms": [
          "ios",
          "android",
          "web"
        ]
      }
    ],
    "sizes": [],
    "measurements": [
      {
        "id": "badge-diameter",
        "label": "Category badge diameter",
        "kind": "example-only",
        "token": "--cds-size-20",
        "value": 40,
        "unit": "px",
        "appliesTo": [
          "badge"
        ],
        "notes": "Badges are drawn on the canvas at a 20-unit radius, matching the --cds-size-20 token; the value is a canvas constant rather than a CSS-token binding, so this is example-only."
      },
      {
        "id": "node-radius",
        "label": "Scan node radius",
        "kind": "example-only",
        "token": "--cds-size-4",
        "value": 4,
        "unit": "px",
        "appliesTo": [
          "node"
        ],
        "notes": "Scan nodes are drawn at a 4-unit radius, matching the --cds-size-4 token; the value is a canvas constant rather than a CSS-token binding, so this is example-only."
      }
    ],
    "layout": {
      "alignment": "The canvas is centered up to its width cap and keeps a square aspect.",
      "flow": "Category rows stack vertically with badges on the left and a legend beneath.",
      "notes": [
        "The scan field is drawn on a canvas, so its geometry is expressed in canvas units, not CSS tokens."
      ]
    },
    "typographyAndColor": {
      "typography": [
        {
          "label": "Legend and badge text",
          "description": "Canvas legend and badge labels are drawn near the body ramp size.",
          "token": "--cds-type-body-size"
        }
      ],
      "colors": [
        {
          "label": "Field",
          "description": "The scan field background.",
          "token": "--cds-bg-surface"
        },
        {
          "label": "Axis and gray nodes",
          "description": "Row axes and settled gray nodes.",
          "token": "--cds-divider"
        },
        {
          "label": "Playhead",
          "description": "The sweep playhead is drawn from primary text at reduced opacity.",
          "token": "--cds-text-primary"
        },
        {
          "label": "Legend text",
          "description": "Legend labels use secondary text.",
          "token": "--cds-text-secondary"
        }
      ]
    },
    "states": [
      {
        "id": "scanning",
        "label": "Scanning",
        "description": "With motion allowed the sweep animates nodes across the rows."
      },
      {
        "id": "static",
        "label": "Static",
        "description": "Under reduced motion a still frame is drawn from the progress value with no animation."
      },
      {
        "id": "empty",
        "label": "Empty",
        "description": "No items renders nothing, so pair with an upstream empty state."
      }
    ],
    "behavior": [
      {
        "label": "Decorative texture",
        "description": "Use BubbleMatrix for scanning texture and motion, not for precise magnitude reads."
      },
      {
        "label": "Static progress",
        "description": "The progress value positions the static sweep and drives node density per row."
      },
      {
        "label": "Value density",
        "description": "Node density per row scales with each category value."
      }
    ],
    "accessibility": [
      {
        "label": "Meaningful chart",
        "description": "Pass an accessible label on the wrapper so the scan is announced as a meaningful image."
      },
      {
        "label": "Canvas is hidden",
        "description": "The inner canvas is hidden from assistive technology; the wrapper label carries the meaning."
      }
    ],
    "contentAdaptation": [
      {
        "label": "Texture over precision",
        "description": "Use BubbleMatrix for a scanning centerpiece; use CategoryBars or ActionOrbs for accurate comparison."
      },
      {
        "label": "Center value",
        "description": "Pick BurstGraph instead when you want a single big center value radiating category points."
      }
    ],
    "motionHaptics": {
      "motion": [
        {
          "label": "Scan sweep",
          "description": "A playhead sweeps back and forth, emitting nodes that travel to their badges."
        },
        {
          "label": "Reduced motion",
          "description": "When reduced motion is set the sweep is replaced by a single static frame positioned by progress."
        }
      ],
      "haptics": [
        {
          "label": "No feedback",
          "description": "The chart is a display and requests no haptic feedback."
        }
      ]
    },
    "platformDifferences": []
  },
  "platforms": {
    "implemented": [
      "web"
    ],
    "native": "Imported design guidance only; no native implementation or parity verification in this preview.",
    "react": {
      "implementation": "local",
      "status": "preview",
      "parity": "web-reference"
    },
    "vue": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    },
    "swift": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    },
    "kotlin": {
      "implementation": "absent",
      "parity": "not-verified",
      "status": "reference-only"
    }
  },
  "tokens": [
    {
      "name": "--cds-size-20",
      "light": "20px",
      "dark": "20px"
    },
    {
      "name": "--cds-size-4",
      "light": "4px",
      "dark": "4px"
    },
    {
      "name": "--cds-type-body-size",
      "light": "1rem",
      "dark": "1rem"
    },
    {
      "name": "--cds-bg-surface",
      "light": "#ffffff",
      "dark": "#1b1b18"
    },
    {
      "name": "--cds-divider",
      "light": "#e0ddd6",
      "dark": "#ffffff1a"
    },
    {
      "name": "--cds-text-primary",
      "light": "#141410",
      "dark": "#f3f1ed"
    },
    {
      "name": "--cds-text-secondary",
      "light": "#646260",
      "dark": "#ffffff99"
    }
  ],
  "review": {
    "local_status": "not-reviewed",
    "source_approval": null,
    "imported_spec_status": "approved",
    "spec_origin": "imported-adapted",
    "local_spec_source_status": "approved",
    "imported_source_revision": "f96f416e1c3bfbfaffcd155a88b87b18b8bb25f1",
    "note": "Inherited specification status is provenance, not approval of the current local implementation or extracted contract."
  },
  "missing_facts": [
    {
      "code": "human-review-pending",
      "detail": "This local preview has no recorded human design or engineering sign-off."
    },
    {
      "code": "platform-parity-unverified",
      "detail": "Vue, Swift and Kotlin implementations are absent from this package; platform parity has not been verified."
    },
    {
      "code": "figma-mapping-unverified",
      "detail": "No current component-level Figma node and immutable revision have been verified for this contract."
    }
  ]
}
```

## Visual states

- [Default](/storybook/iframe.html?id=cloaked-design-system-visualizations-bubblematrix--default&viewMode=story) | export: Default | source: packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.stories.tsx

- [Empty](/storybook/iframe.html?id=cloaked-design-system-visualizations-bubblematrix--empty&viewMode=story) | export: Empty | source: packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.stories.tsx

- [Dense](/storybook/iframe.html?id=cloaked-design-system-visualizations-bubblematrix--dense&viewMode=story) | export: Dense | source: packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.stories.tsx

- [Dark Theme](/storybook/iframe.html?id=cloaked-design-system-visualizations-bubblematrix--dark-theme&viewMode=story) | export: DarkTheme | source: packages/design-system/src/components/visualizations/BubbleMatrix/BubbleMatrix.stories.tsx

Preview pending human sign-off. Source-derived APIs and successful checks do not certify accessibility, native parity or approval.
