
Installs all 97 components. Without our CLI, run instead.
retab publishes a shadcn registry at ui.retab.com, with 97 components installable through the shadcn CLI.
Copy a prompt for your agent, copy the install command, or open the docs that ship it.
File attachment navigator built from SidebarList primitives and FileThumbnail.
An autocomplete input built on Base UI primitives.
A classification result with consensus visible in the sidebar: selected category, likelihood, and every vote beside the source document.
A fixed-line code and log viewer with line numbers, custom virtualization, source-line highlights, retry, zoom, and download.
Bridges the document-source model to the CSV viewer: csvAnchorToTarget and sourceToCsvCell for csv_cell anchors.
Extracted values linked to spreadsheet cells — hover to highlight a cell and scroll to it.
A fixed-window virtualized CSV/TSV table: sortable columns, sticky header, row numbers, horizontal scroll. Renders straight from raw rows (no table row model) so it stays flat in memory on huge files.
A lightweight editable cell for scalar document data: text, numbers, booleans, dates, times, and date-times.
Pure document location types used by evidence projection and viewer target adapters.
Pure projection types for semantic evidence rows that can resolve to document anchors.
Bridges the document-source model to the DOCX viewer: docxAnchorToTarget and sourceToDocxHighlight for docx_text_span and docx_table_cell anchors.
Values extracted from a Word document linked back to where they came from — hover to highlight the text and scroll to it.
A docx-preview-backed Word viewer: faithful paginated pages, continuous scroll, zoom, fit-to-width, and download. Off-screen pages are skipped via CSS content-visibility.
A headless file-intake primitive with drag/drop, file input wiring, validation, controlled state, and accessibility prop getters.
A single replaceable image slot with a custom circular preview.
A file-uploader lab proving the headless dropzone primitive across default, non-button, native-button, controlled, validation-only, custom grid, upload progress, uploader-viewer, and disabled surfaces.
Two independent dropzones model original versus revision documents.
Parent-owned file state with controlled selected files and explicit clear behavior.
Direct useDropzone composition with FileThumbnail previews in a custom grid.
Disabled input, trigger focus, intake, and drag behavior.
Files become ordered evidence events inside a custom surface.
One intake target routes selected files into document, image, and table lanes.
Audio and video files queued as transcript jobs with per-file thumbnails.
A real button trigger with browser button semantics and a small selected-file queue.
A custom element opens the file dialog while preserving dropzone state.
A full canvas trigger that pins dropped files as cards.
Slot-level dropzones for checklist-driven packet collection.
A single spreadsheet upload feeding a mapping workflow.
A dropzone-backed upload queue with per-file loading bars keyed by the admitted file ids.
Validate accepted files and rejection details without storing selected files.
Detected form fields beside a PDF source document, linked by their bbox — hover or select a field to highlight its region on the page; Preview stamps values over the source, and Filled renders a supplied output file.
Render recursive MIME messages with headers, CID inline resources, nested messages, and File Viewer leaves.
One Excel workbook fanned out into several clean CSVs — each reconstructed table rendered in the viewer, with a sidebar listing every CSV the splitter emitted, the sheet it was carved from, and how it was reconstructed. Selecting one opens that CSV.
Extracted data beside the source PDF, rendered as a JSON form and linked by sources — hover or select a field to highlight where its value came from and scroll the page to it.
A small byte-size display formatter for file UI components.
A document workspace over a flat object-store manifest with list, grid, columns, lazy folders, generated thumbnails, and FileViewer previews.
A document workspace over a flat object-store manifest with list, grid, columns, generated thumbnails, and persistent file previews.
A minimal file tree in a ViewerSidebar with FileViewer in the ViewerSurface.
Render complete file thumbnails from browser files, URLs, blobs, text sources, external images, or custom preview content.
Dependency-free thumbnail frame with a loading shimmer, fade-in, and muted fallback surface.
A polished Retab document upload area built from the headless Dropzone primitive and File Thumbnail.
One viewer for any file: detects the type and lazy-loads the matching renderer (PDF, DOCX, XLSX, PPTX, CSV, images) plus inline, virtualized text/code/JSON, Markdown (sandboxed), and HTML (sandboxed). Only the needed parser is ever downloaded.
A purified composition experiment: file tree in a ViewerSidebar, selected source rendered by FileViewer in a ViewerSurface.
A connected control group primitive for buttons, inputs, separators, and text addons.
Bridges the document-source model to the image viewer: imageAnchorToTarget, rotateImageArea, and renderImageSourceOverlay for image_bbox anchors.
Extracted fields linked to a scanned page image — hover to highlight the image_bbox region.
A performant image viewer with native off-thread decode (createImageBitmap), continuous scroll, zoom, rotate, fit-to-width, download, and a per-frame overlay slot. Renders multi-page TIFF scans efficiently: frames decode lazily near the viewport and decoded bitmaps are capped. No useEffect.
Extraction rendered as a JSON form beside the source PDF — hover a form field to highlight where its value came from through segmented-document state.
A read-only JSON viewer with theme-aware syntax highlighting and a hover copy button, plus a standalone CopyButton.
A keyboard shortcut display primitive.
A provider-agnostic layout inspection component for OCR output: normalize Google Document AI, AWS Textract, or Azure Document Intelligence into shared blocks, lines, and words, then review them over the source page with virtualized rows, confidence filtering, and precise overlays.
Projection helpers that convert OCR/layout blocks into segmented-document segments and anchors.
A continuous Markdown viewer forked from the Chenglou Pretext text viewer, with block virtualization and no visible page model.
OCR review for a scanned document: source page, detected text blocks, confidence filtering, and matching polygon overlays. Switch between Google Document AI, AWS Textract, and Azure Document Intelligence output.
A page-axis ribbon: segments drawn as blocks spanning their pages. One vertical lane = a split sidebar; many horizontal rows (consensus + votes) = a partition waterfall. Shared hover/focus/selection + click-to-jump.
A colored page strip that ties a Segment[] to the document; hover/select syncing and click-to-jump.
The source document beside its extracted markdown, synced by page, with a Rendered/Text toggle.
Keyed chunks over a PDF: a legend plus a horizontal page-ribbon waterfall, from the shared segment primitives.
Bridges the document-source model to the PDF viewer: pdfAnchorToTarget and renderPdfSourceOverlay for PDF bbox anchors.
A PDF viewer with toggleable page thumbnails in a viewer navigation rail.
A pdfjs-backed PDF viewer: continuous scroll, controlled or uncontrolled zoom, rotate, fit-to-width, download, a per-page overlay slot for bounding-box citations, a PdfHighlight overlay, and imperative scrollToPage / scrollToPageArea handles for driving source highlights.
PDF-owned page thumbnail navigation for explicit PdfViewer composition: lazy pdfjs thumbnails, active-page highlight, and click-to-jump.
A canvas-backed PowerPoint viewer rendered entirely client-side (no server conversion): continuous scroll, zoom, rotate, fit-to-width, download, and a per-slide overlay slot. Slides render lazily near the viewport and renders are serialized.
Each Retab primitive's result framed as a run card — a document thumbnail with a status pill and the primitive's output in the card body. Classification shows the page with its category and reasoning; split a mini page rail of color-keyed subdocuments; partition a keyed-chunk legend with an overlap ribbon; parse the page rendered as markdown; extract the page with each field's source box drawn over it. Composes the primitive-run-cards components over sample results.
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.
A document run card: a file thumbnail with a status pill, a heading, and a result slot. Composes file-thumbnail; the result rendering is left to its children.
Controlled JSON Schema editor for building Retab extraction schemas — fields, types, nested objects, arrays, enums, and required flags.
Shared segmented-document model, provider, viewport controller, and anchor navigation for split, partition, source, OCR, and bbox viewers.
Compact color legend for a Segment[] with shared hover, focus, and selection state.
Vertical page rail for Segment[] documents with current-page following, scroll progress, and page selection.
Selectable list of segments with page ranges and confidence bars.
Providerless sidebar list primitives for embedded viewer and domain sidebars.
Shared sidebar row button styling variants used by app and providerless sidebar primitives.
Pure conversion from document-source anchors to document viewer anchors.
Projection helpers that convert document sources, source maps, and source fields into evidence rows with resolved document anchors.
A field-path adapter over segmented-document anchors.
A field list that drives source-field interaction: hover previews the field location in the viewer, click selects it.
A floating pill that reports active field source state over a viewer: nothing selected, a located field path, or a field with no source.
Projection helpers and overlays that convert PDF/image bbox document sources into segmented-document segments, anchors, and active source highlights.
Every source-backed format in one viewer — PDF/image bbox sources use segmented-document anchors; text, CSV, Excel, and Word use segmented source links with format-specific target adapters.
A compact loading spinner using Lucide.
A split consensus segment diagram with consolidation, five raw votes, and contested-page density in a wide horizontal sidebar beside the PDF.
A split consensus segment diagram with the page axis running vertically for a narrow sidebar beside the PDF.
The split benchmark diagram from Lukas Bjorkland's article, with GT, Split v1, Split v2, the PDF pane, and the same dark metrics table treatment.
A split result with multi-run consensus visible in the sidebar: the page rail stays beside output-level likelihoods and each vote used to build the final split.
Named subdocuments over a PDF: a legend header and a vertical page-ribbon sidebar, from the shared segment primitives.
Bridges the document-source model to text viewers: textAnchorToTarget and sourceToTextHighlight for text_span anchors.
Values extracted from a log file linked to the lines they came from — hover to highlight a line range.
A Pretext-powered prose viewer with natural wrapping, custom variable-height virtualization, source-line highlights, retry, zoom, and download.
An imperative Pretext prose viewer that keeps Text Viewer parsing/layout but projects visible rows through a Chenglou-style DOM cache.
One plain-text batch file separated into several documents — each carved-out document rendered in the viewer, with a left sidebar listing the source file first, then every document the splitter emitted, its type, line count, and the boundary cue that detected it. Selecting one opens that document.
Client hook that coordinates hover, focus, and persistent selection across Segment[] surfaces.
A shared controls row for viewer chrome: title, position, zoom, rotate, download, loading, and extra controls.
Bridges the document-source model to the XLSX viewer: xlsxAnchorToTarget and sourceToXlsxCell for spreadsheet_cell anchors.
Extracted values linked to spreadsheet cells across sheets — hover to switch sheet, highlight the cell, and scroll to it.
A fixed-window virtualized Excel/spreadsheet viewer rendered entirely client-side: sheet tabs, zoom, download, formatted values, numeric alignment, sparse workbook storage, and row + column virtualization so huge sheets stay smooth. No useEffect for data loading.
Retab UI is a shadcn registry for products where files, schemas, citations, and extracted data need to live in the same interface. Install the pieces you need as local React and Tailwind source, then adapt them inside your own design system.
The library focuses on the awkward surfaces generic UI kits usually skip: multi-format file rendering, OCR layout review, source-backed JSON fields, upload intake, thumbnail generation, schema editing, and workflow blocks for parse, extract, split, and partition results.
@retab/*Add a registry item with the shadcn CLI:
npx shadcn@latest add @retab/file-viewer
Render the generated component from your app:
import { FileViewerPreview } from "@/components/ui/file-viewer";
export default function Page() {
return (
);
}
The install writes source files into your repository. Keep the generated code as
part of your app, and adjust aliases such as @/components/ui/file-viewer or
@/components/blocks/ocr-block if your project uses a different layout.
Put extracted fields beside their evidence. PDF, image, text, CSV, Excel, and Word sources all use the same interaction model: focus a value, reveal the region, line, cell, or span behind it.
pnpm dlx shadcn@latest add @retab/sources-viewer-block
import { SourcesViewerBlock } from "@/components/blocks/sources-viewer-block";
export default function Page() {
return ;
}
Inspect OCR output as a document, not as raw provider JSON. The block pairs the page image with normalized text blocks, confidence metadata, and provider switching for Google Document AI, AWS Textract, and Azure Document Intelligence.
pnpm dlx shadcn@latest add @retab/ocr-block
import { OcrBlock } from "@/components/blocks/ocr-block";
export default function Page() {
return ;
}
A document workspace over object-store manifests. List, grid, and column views
share selection, lazy folders, generated thumbnails, and a persistent
FileViewer preview.
pnpm dlx shadcn@latest add @retab/file-system-block
import { FileSystemBlock } from "@/components/blocks/file-system-block";
export default function Page() {
return ;
}
Preview files before users open them. The thumbnail frame accepts files, URLs, blobs, inline text, generated preview images, and custom preview content.
npx shadcn@latest add @retab/file-thumbnail
import { FileThumbnail } from "@/components/ui/file-thumbnail";
export function InvoiceThumbnail() {
return (
);
}
npx shadcn@latest add @retab/file-viewer
npx shadcn@latest add @retab/pdf-viewer
npx shadcn@latest add @retab/docx-viewer
npx shadcn@latest add @retab/xlsx-viewer
npx shadcn@latest add @retab/file-thumbnail
npx shadcn@latest add @retab/dropzone
npx shadcn@latest add @retab/schema-builder
npx shadcn@latest add @retab/data-cell
pnpm dlx shadcn@latest add @retab/sources-viewer-block
pnpm dlx shadcn@latest add @retab/ocr-block
pnpm dlx shadcn@latest add @retab/file-system-block
pnpm dlx shadcn@latest add @retab/parse-viewer-block
pnpm dlx shadcn@latest add @retab/split-viewer-block
pnpm dlx shadcn@latest add @retab/partition-viewer-block
pnpm dlx shadcn@latest add @retab/pdf-thumbnails-block
pnpm install
pnpm dev
pnpm registry:build
pnpm test
pnpm typecheck
The docs app runs at http://localhost:3100.
Retab UI is built by Retab.
Licensed under the MIT license.
The packages and primitives its components pull in, counted across the registry.
Every appearance and removal our crawl has seen in the registry index.
retab is a component library on 21st.dev by retab-dev with 1 public React component. Every component ships with a live interactive preview and full TSX source — copy the code, install it through the shadcn CLI, or pull it into Cursor or Claude Code over MCP.