AI Agents Fancy Stable

AiDataTable

Compact comparison table for a model's structured answer: real table semantics, tabular numeric columns, check-or-dash booleans, and one tintable column — rendered in the order it arrived, with no sorting

Preview

Installation

pnpm add fancy-ui-svelte
import { AiDataTable } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { AiDataTable } from 'fancy-ui-svelte';
</script>

<AiDataTable />

Examples

Basic Usage

Props

PropTypeDefaultDescription
columns *AiDataTableColumn[]-Columns in render order: key, label, and optional align / numeric. A numeric column gets tabular figures and right alignment
rows *AiDataTableRow[]-Rows keyed by column key, in the order the model produced them; a missing key renders as empty
caption string-Names the table for assistive tech; rendered in a visually-hidden <caption> unless captionVisible
captionVisible booleanfalseAlso shows the caption, as a muted line above the table
dense booleanfalseTighter rows, for a table read at a glance rather than studied
highlightColumn string-Key of the column to tint — the recommendation, or whichever criterion decided it

Slots

SlotDescription
cellReplaces the default rendering of every cell; receives the raw value and { row, key }