BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/retab-ui/primitive-run-cards

Primitive Run Card Components

retab-ui/primitive-run-cards
FreeComponent

Prop-driven run cards for each Retab primitive — classify, split, partition, parse, and extract — each framing the source document with that primitive's result over the shared RunCard shell. Presentational: pass the resolved result (category, segments, markdown, or extract fields), so the same cards render a static demo or a live workflow run's per-block result.

Install it

npx shadcn@latest add https://ui.retab.com/r/primitive-run-cards.json

Source

registry/new-york-v4/ui/primitive-run-cards.tsxui.retab.com/r/primitive-run-cards.json · first 6 KB
1"use client";
2
3import type React from "react";
4import ReactMarkdown, { type Components } from "react-markdown";
5import remarkGfm from "remark-gfm";
6
7import {
8 SEGMENT_PALETTE,
9 segmentsPageCount,
10 type Segment,
11} from "@/lib/segments";
12import { FileThumbnail } from "@/components/ui/file-thumbnail";
13import { PageRibbon, type RibbonRow } from "@/components/ui/page-ribbon";
14import { RunCard, type RunStatus } from "@/components/ui/run-card";
15import { SegmentLegend } from "@/components/ui/segment-legend";
16import type { Source, SourceAnchor } from "@/lib/document-source";
17
18/**
19 * Prop-driven primitive run cards — one card per Retab primitive (classify,
20 * split, partition, parse, extract), each framing the source document with that
21 * primitive's result over the shared {@link RunCard} shell. Presentational: the
22 * caller resolves the result (a category, `Segment[]`, markdown, or extract
23 * fields) and passes it in, so the same cards render a static demo or a live
24 * workflow run's per-block result.
25 */
26
27// The sample pages are US-Letter; one page aspect lets coordinate-anchored
28// overlays (the extract source boxes) map onto the cropped thumbnail.
29const PAGE_ASPECT = 800 / 1036;
30
31export type PrimitiveRunCardFile = { name: string; type: string };
32
33interface PrimitiveRunCardBase {
34 /** Source document the run was over. */
35 file: PrimitiveRunCardFile;
36 /** Run lifecycle pill; defaults to "completed". */
37 status?: RunStatus | null;
38 /** Makes the whole card a button. */
39 onClick?: () => void;
40}
41
42// ── Classification ────────────────────────────────────────────────────────────
43
44export interface ClassificationRunCardProps extends PrimitiveRunCardBase {
45 /** Page image rendered behind the result. */
46 previewImageUrl?: string;
47 /**
48 * Custom media rendered in the shared RunCard frame. Use this when a consumer
49 * owns document loading/cropping behavior but still wants the shared
50 * classification footer and run-card shell.
51 */
52 media?: React.ReactNode;
53 /** Aspect ratio for custom media; defaults to the RunCard media frame. */
54 mediaAspectRatio?: number;
55 category: string;
56 reasoning?: string;
57}
58
59export function ClassificationRunCard({
60 file,
61 previewImageUrl,
62 media,
63 mediaAspectRatio,
64 category,
65 reasoning,
66 status = "completed",
67 onClick,
68}: ClassificationRunCardProps) {
69// … truncated

What it pulls in

npm packages

  • react-markdown@^10.1.0
  • remark-gfm@^4.0.1

Other registry items

  • @retab/run-card
  • @retab/segments
  • @retab/page-ribbon
  • @retab/segment-legend
  • @retab/document-source

Files it writes

  • registry/new-york-v4/ui/primitive-run-cards.tsx

Facts

Registry
retab-ui
Type
registry:ui
Access
Free
Files written
1
Licence
NOASSERTION
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

ui.retab.com retab-dev/retab-ui on GitHub Raw registry item This item as JSON

More from retab-ui

All 130 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Alertalertretab-uiComponentsFree1 dep
Alert Dialogalert-dialogretab-uiComponentsFree1 dep
Aspect Ratioaspect-ratioretab-uiComponentsFreeno deps
Attachment Sidebarattachment-sidebarretab-uiComponentsFree1 dep
Autocompleteautocompleteretab-uiComponentsFree2 deps
Calendarcalendarretab-uiComponentsFree2 deps
Code Viewercode-viewerretab-uiComponentsFree2 deps · 32 files
Commandcommandretab-uiComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex