318

Bounding Box Citations

Review extracted values against source bounding box citations with form fields and JSON diffing.

Bounding Box Citations provides field-level cards for comparing extracted values with source PDF bounding boxes. Use it when reviewers need to inspect citations, correct values, and optionally compare against expected output.

See it composed with the PDF Viewer in the Bounding Box Citations block.

Installation

Glide Data Grid renders overlay editors into a root portal. Add this element as the last child of your app's <body> before using the component:

<div id="portal" className="fixed top-0 left-0 z-40" />
pnpm dlx shadcn@latest add @extend/bounding-box-citations

Useful behaviors

  • Actual and expected values displayed side by side for each schema field when showExpected is enabled.
  • Array values rendered with Glide Data Grid, including drill-down for nested arrays and objects.
  • Input controls selected from the JSON schema property type.
  • Object schema properties rendered as nested cards in the scrollable form.
  • Per-field undo and Set to NULL actions when showExpected is enabled.
  • Form and JSON diff views for the same reviewed output state when showExpected is enabled.

API Reference

HumanReviewPanel

The HumanReviewPanel component renders editable review fields and a JSON diff for the same extraction output.

PropTypeDefaultRequired
fieldsReviewField[]sample fieldsNo
activeFieldKeystring-No
classNamestring-No
onFieldFocus(field: ReviewField) => void-No
showExpectedbooleantrueNo
theme"light" | "dark""light"No

ReviewField

PropTypeDefaultRequired
keystring-Yes
schemaReviewFieldSchema-Yes
actualJsonValue-Yes
expectedJsonValue-Yes
location{ page: number; area: HighlightArea }-No