Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Data components display and edit extracted document data within V2 data forms. Each component binds to the data context via taxonomy tag paths, rendering the appropriate editor or display based on the taxon type defined in your taxonomy.

v2:attributeEditor

The core editing component. It resolves a taxonomy tag path to a data object attribute and renders the correct editor (text input, dropdown, date picker, etc.) based on the taxon type.

Props

PropTypeDefaultDescription
tagPathstringrequiredTaxonomy path to bind to
labelstringDisplay label (auto-derived from the last segment of the tag path if omitted)
colSpannumberColumn span in grid layout (1-12)
readonlybooleanfalseDisable editing
valueFromstringTag path to mirror value from (makes field read-only, see Data Binding)
editorOptionsAttributeEditorOptionsAdvanced editor configuration (see below)
When valueFrom is set, the editor becomes a read-only input that displays the value from the referenced tag path. It checks shared formValues first, then falls back to searching data object attributes.

Editor Options

The editorOptions object provides fine-grained control over editor behavior and appearance.
OptionTypeDescription
placeholderstringPlaceholder text when empty
cellModebooleanExcel-like flat appearance for grid cells — no border/shadow by default, border appears on hover/focus
cellBackgroundstringCell background color (e.g., '#f0fdf4')
cellColorstringCell text color (e.g., '#166534')
cellTestIdstringCustom data-testid for testing
displayAsRadiobooleanRender SELECTION taxons as radio buttons instead of a dropdown
isCheckboxbooleanRender as a checkbox
onCheckValuestringValue to set when checkbox is checked
showCalendarPopupbooleanShow a calendar picker for date fields
sourceDateFormatstringSource date format for parsing
maskDateFormatstringDisplay date format
isMaskedTextbooleanUse masked text display
maskedTextstringMask pattern
hideExceptionPopupbooleanHide the validation exception popup
showPreviewbooleanShow value preview
hideAttributeMenubooleanHide the attribute context menu (defaults to false)
hideInsertActionsbooleanHide insert actions
allowDirectExtractbooleanEnable direct text extraction from the document (see Extraction)
aiExtractionAIExtractionConfigAI-powered extraction configuration (see Extraction)
showAddFromSelectionbooleanShow a ”+” button on text selection (implied when aiExtraction is configured)
allowDirectExtract and aiExtraction are mutually exclusive. Use allowDirectExtract for fields where the value can be copied verbatim from the document. Use aiExtraction when an LLM should interpret and extract the value.
When aiExtraction is configured without an explicit placeholder, the editor auto-sets the placeholder to “Select text in document, then click to extract”. When allowDirectExtract is configured without a placeholder, it auto-sets to “Select text in document to copy value”.

Examples

Basic attribute editor:
{
  "component": "v2:attributeEditor",
  "props": {
    "tagPath": "invoice/invoiceNumber",
    "label": "Invoice Number"
  }
}
Read-only editor with value mirrored from another field:
{
  "component": "v2:attributeEditor",
  "props": {
    "tagPath": "invoice/displayTotal",
    "label": "Total",
    "readonly": true,
    "valueFrom": "invoice/calculatedTotal"
  }
}
Checkbox editor:
{
  "component": "v2:attributeEditor",
  "props": {
    "tagPath": "invoice/approved",
    "label": "Approved",
    "editorOptions": {
      "isCheckbox": true,
      "onCheckValue": "true"
    }
  }
}

v2:label

A read-only text display component. Use it for static headings, section titles, or descriptive text within a form.

Props

PropTypeDefaultDescription
textstringrequiredThe text content to display
classstringtext-sm font-medium text-foregroundCSS class string for styling

Example

{
  "component": "v2:label",
  "props": {
    "text": "Shipping Details",
    "class": "text-base font-bold text-foreground mb-2"
  }
}
Labels support dynamic text via bindings:
{
  "component": "v2:label",
  "bindings": {
    "text": "`Total items: ${ctx.dataObjects?.length ?? 0}`"
  }
}

v2:table

A row-based data display and editing component. It scopes rows by the parent taxonomy path of the first column’s tag metadata, then renders each matching data object as a table row with inline attribute editors.

Props

PropTypeDefaultDescription
tagPathPrefixstringTaxonomy path prefix for scoping rows
columnsArrayrequiredColumn definitions
Each entry in columns has the following shape:
FieldTypeRequiredDescription
tagPathstringyesTaxonomy path for the column’s attribute
labelstringyesColumn header text
widthstringnoCSS width (e.g., '200px', '30%')

Example

A three-column table for invoice line items:
{
  "component": "v2:table",
  "props": {
    "tagPathPrefix": "invoice/lineItems",
    "columns": [
      { "tagPath": "invoice/lineItems/description", "label": "Description", "width": "50%" },
      { "tagPath": "invoice/lineItems/quantity", "label": "Qty", "width": "25%" },
      { "tagPath": "invoice/lineItems/amount", "label": "Amount", "width": "25%" }
    ]
  }
}
When no matching data objects are found, the table displays a “No line items found” placeholder.

v2:grid

An enhanced data grid backed by the KodexaDataObjectGrid component (ag-Grid). It provides sorting, filtering, grouping, and inline editing for repeating data objects.

Props

PropTypeDefaultDescription
groupTaxonstringrequiredTaxonomy path of the group taxon whose children define columns
groupablebooleanfalseEnable row grouping
showColumnMenubooleanfalseShow column menu for visibility and ordering
aiExtractionAIGridExtractionConfigAI-powered row extraction (see Extraction)
The grid automatically builds its column definitions from the children of the specified groupTaxon in the taxonomy. All data objects in the current data context are passed to the grid, which filters them internally by path and parent ID.

Example

A grid for financial line items:
{
  "component": "v2:grid",
  "props": {
    "groupTaxon": "financialStatement/lineItems",
    "groupable": true,
    "showColumnMenu": true
  }
}
Grid with AI extraction:
{
  "component": "v2:grid",
  "props": {
    "groupTaxon": "invoice/lineItems",
    "aiExtraction": {
      "promptRef": "my-org/extract-line-items",
      "modelType": "LARGE"
    }
  }
}
When aiExtraction is configured, an “AI Extract” button appears in the grid toolbar. Target fields are automatically derived from the group taxon’s children unless explicitly overridden via targetPaths.

v2:dataTable

A read-only data grid for rendering arbitrary JSON data, powered by AG Grid. Unlike v2:table (which binds to taxonomy tag paths and renders inline attribute editors), v2:dataTable takes a plain array of objects and renders them in a fully-featured grid with sorting, filtering, and column resizing. It is typically used as a child of v2:serviceBridgeView to display bridge responses, but can be used anywhere with binding expressions. The grid automatically uses the platform’s AG Grid theme, matching light/dark mode.

Props

PropTypeDefaultDescription
rowsarrayArray of objects to render as rows
columnsArrayColumn definitions (inferred from first row if omitted)
emptyMessagestring"No data"Message shown when there are no rows
filterablebooleantrueShow a quick-filter search box above the grid that filters across all columns. Set to false to hide it.
pageSizenumber10Number of rows per page. The grid always shows a pagination footer with row counts and page navigation. Adjust this to control how many rows are visible per page.
Each entry in columns:
FieldTypeRequiredDescription
fieldstringyesProperty name to read from each row object
titlestringnoColumn header text (defaults to the field name)
widthnumbernoColumn width in pixels. Columns without a width flex to fill available space.
typestringnoColumn type: "string" (default) or "boolean" (renders checkmark/cross icon)

Built-in Features

Because v2:dataTable uses AG Grid under the hood, you get these features automatically:
  • Quick filter — a search box above the grid filters across all columns as you type (enabled by default, disable with filterable: false)
  • Pagination — a footer showing row counts (e.g. “1 to 10 of 25”) with page navigation controls. Defaults to 10 rows per page, configurable via pageSize.
  • Sorting — click any column header to sort ascending/descending
  • Column filtering — each column header shows a filter icon with type-appropriate filtering (text search for strings, set filter for booleans)
  • Column resizing — drag column borders to resize
  • Theme integration — automatically follows the platform’s light/dark mode

Examples

With explicit columns (quick filter and pagination are enabled by default):
{
  "component": "v2:dataTable",
  "bindings": {
    "rows": "ctx.$bridgeResult"
  },
  "props": {
    "columns": [
      { "field": "carrier", "title": "Carrier" },
      { "field": "rate", "title": "Rate", "width": 120 },
      { "field": "transit", "title": "Transit Days", "width": 120 }
    ]
  }
}
Custom page size with quick filter disabled:
{
  "component": "v2:dataTable",
  "bindings": {
    "rows": "ctx.$bridgeResult"
  },
  "props": {
    "filterable": false,
    "pageSize": 25,
    "columns": [
      { "field": "carrier", "title": "Carrier" },
      { "field": "rate", "title": "Rate", "width": 120 },
      { "field": "transit", "title": "Transit Days", "width": 120 }
    ]
  }
}
Boolean column with checkmark rendering:
{
  "component": "v2:dataTable",
  "bindings": {
    "rows": "ctx.$bridgeResult"
  },
  "props": {
    "filterable": true,
    "columns": [
      { "field": "name", "title": "Bill To Name" },
      { "field": "isValid", "title": "Valid", "type": "boolean", "width": 100 }
    ]
  }
}
With auto-inferred columns (column headers derived from property names):
{
  "component": "v2:dataTable",
  "bindings": {
    "rows": "ctx.$bridgeResult?.items"
  }
}
Static data via props (no bridge required):
{
  "component": "v2:dataTable",
  "props": {
    "rows": [
      { "code": "USD", "name": "US Dollar" },
      { "code": "EUR", "name": "Euro" },
      { "code": "GBP", "name": "British Pound" }
    ],
    "columns": [
      { "field": "code", "title": "Currency Code" },
      { "field": "name", "title": "Currency Name" }
    ]
  }
}

v2:markdown

Renders markdown content as formatted HTML using the platform’s KodexaMarkdown renderer. Supports headings, lists, tables, code blocks, and all standard markdown syntax. Typically used as a child of v2:serviceBridgeView to display formatted text from bridge responses.

Props

PropTypeDefaultDescription
contentstringMarkdown content to render
sizestring"medium"Size variant ("small", "medium", "large")

Examples

Static markdown:
{
  "component": "v2:markdown",
  "props": {
    "content": "### Instructions\n\nReview the extracted values and correct any errors before approving."
  }
}
Dynamic content from a bridge response:
{
  "component": "v2:markdown",
  "bindings": {
    "content": "ctx.$bridgeResult?.analysisReport"
  }
}
Markdown with size variant:
{
  "component": "v2:markdown",
  "bindings": {
    "content": "ctx.$bridgeResult?.summary"
  },
  "props": {
    "size": "small"
  }
}

v2:knowledgeSection

Displays knowledge base content within a form. It looks up a knowledge item by type from the workspace’s document families, loads the item’s markdown content, and renders it in a collapsible section.

Props

PropTypeDefaultDescription
knowledgeItemTypestringrequiredThe knowledge item type identifier to look up
The component handles three states: loading (with a spinner), not found (with an italicized message), and loaded (with an expandable section showing the title and rendered markdown).

Example

{
  "component": "v2:knowledgeSection",
  "props": {
    "knowledgeItemType": "processing-instructions"
  }
}
The component searches across all document families in the current workspace for a knowledge item matching the specified type. The item’s instructionMarkdown property is rendered as formatted HTML with support for headings, lists, tables, and code blocks.

v2:exceptions

Displays validation exceptions for data objects in the current scope. It aggregates exceptions from all data objects, filters by status and tag paths, and renders each exception as a compact card.

Props

PropTypeDefaultDescription
titlestringOptional heading above the exceptions list
showResolvedbooleanfalseInclude resolved exceptions (by default only open exceptions are shown)
filterPathsstring[]Only show exceptions for these tag paths (shows all if omitted)
The component listens for workspace:dataExceptionsUpdated events and refreshes automatically when exceptions change.

Example

{
  "component": "v2:exceptions",
  "props": {
    "title": "Validation Issues",
    "filterPaths": ["Invoice/InvoiceNumber", "Invoice/InvoiceDate"]
  }
}