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/split-viewer-block

Split Viewer

retab-ui/split-viewer-block
FreeBlock

Named subdocuments over a PDF: a legend header and a vertical page-ribbon sidebar, from the shared segment primitives.

Install it

npx shadcn@latest add https://ui.retab.com/r/split-viewer-block.json

Source

registry/new-york-v4/blocks/split-viewer-block.tsxui.retab.com/r/split-viewer-block.json
1"use client";
2
3import {
4 FileViewerContent,
5 FileViewerHeader,
6 FileViewerTitle,
7 FileViewerLegend,
8 FileViewer,
9 FileViewerProvider,
10 FileViewerSidebarTrigger,
11 FileViewerInset,
12 FileViewerControls,
13} from "@/components/ui/file-viewer";
14import { PdfViewerPages, PdfViewerProvider } from "@/components/ui/pdf-viewer";
15import type { SplitView } from "@/components/viewers/lib/split-types";
16import {
17 SplitViewerDocument,
18 SplitViewerLegend,
19 SplitViewerProvider,
20 SplitViewerSidebar,
21 useSplitViewerDocumentControls,
22} from "@/components/viewers/split/split-viewer";
23
24const PDF_URL = "/samples/an-image-is-worth-16x16-words.pdf";
25
26// A split result: named subdocuments, each owning a 1-indexed page range.
27const SPLIT_RESULT: SplitView = {
28 output: [
29 { name: "Title, Abstract & Introduction", pages: [1] },
30 { name: "Related Work", pages: [2] },
31 { name: "Method", pages: [3] },
32 { name: "Experiments", pages: [4, 5, 6, 7, 8] },
33 { name: "Conclusion & References", pages: [9, 10, 11, 12] },
34 { name: "Appendix", pages: [13, 14, 15, 16, 17, 18, 19, 20, 21, 22] },
35 ],
36};
37
38/**
39 * Split viewer block — the file + sidebar + legend system over a split result.
40 * `SplitViewer` owns the legend and page rail; the document prop reads page
41 * and scroll controls from the split provider.
42 */
43export function SplitViewerBlock() {
44 const source = {
45 kind: "url" as const,
46 url: PDF_URL,
47 fileName: "an-image-is-worth-16x16-words.pdf",
48 };
49
50 return (
51 <div className="bg-background flex h-full min-h-[680px] flex-col">
52 <SplitViewerProvider result={SPLIT_RESULT}>
53 <FileViewerProvider source={source} defaultSidebarOpen>
54 <FileViewer className="bg-background">
55 <PdfViewerProvider>
56 <FileViewerHeader>
57 <FileViewerSidebarTrigger className="-ms-1" />
58 <FileViewerTitle />
59 <FileViewerControls />
60 </FileViewerHeader>
61 <FileViewerContent>
62 <SplitViewerSidebar />
63 <FileViewerInset>
64 <FileViewerLegend>
65 <SplitViewerLegend className="px-3 py-2" />
66 </FileViewerLegend>
67 <SplitViewerDocument document={<SplitViewerPdfDocument />} />
68 </FileViewerInset>
69 </FileViewerContent>
70 </PdfViewerProvider>
71 </FileViewer>
72 </FileViewerProvider>
73 </SplitViewerProvider>
74 </div>
75 );
76}
77
78// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @retab/file-viewer
  • @retab/pdf-viewer
  • @retab/segment-legend
  • @retab/segment-page-rail
  • @retab/segmented-document
  • @retab/segments

Files it writes

  • registry/new-york-v4/blocks/split-viewer-block.tsx
  • components/viewers/split/split-viewer.tsx
  • components/viewers/lib/split-types.ts
  • components/viewers/lib/partition-types.ts

Facts

Registry
retab-ui
Type
registry:block
Access
Free
Files written
4
Licence
NOASSERTION
First indexed
2026-08-04
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
Classify Consensusclassify-consensus-viewer-blockretab-uiBlocksFree1 dep · 4 files
CSV Sourcescsv-sources-blockretab-uiBlocksFreeno deps · 2 files
DOCX Sourcesdocx-sources-blockretab-uiBlocksFreeno deps · 2 files
Avatar Image Slotdropzone-avatar-image-slotretab-uiBlocksFree1 dep · 2 files
Dropzonedropzone-blockretab-uiBlocksFree1 dep · 26 files
Comparison Pairdropzone-comparison-pair-uploadretab-uiBlocksFree1 dep · 2 files
Controlled Queuedropzone-controlled-queueretab-uiBlocksFree1 dep · 2 files
Custom Thumbnail Griddropzone-custom-thumbnail-gridretab-uiBlocksFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex