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/csv-viewer

CSV Viewer

retab-ui/csv-viewer
FreeComponent

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.

Install it

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

Source

registry/new-york-v4/ui/csv-viewer.tsxui.retab.com/r/csv-viewer.json · first 6 KB
1"use client";
2
3import * as React from "react";
4
5import { useKeyedMountEffect } from "@/hooks/use-keyed-mount-effect";
6import type { CsvDialect, CsvTable } from "@/lib/csv";
7import {
8 createViewerResource,
9 type ViewerResource,
10} from "@/lib/viewer-resource";
11
12import {
13 CsvViewerFrame,
14 CsvViewerHeader,
15 csvViewerStatusNode,
16} from "./csv-viewer-chrome";
17import {
18 csvViewerDownloadActions,
19 defaultCsvDownloadName,
20} from "./csv-viewer-download";
21import { CsvGrid, type CsvGridHandle } from "./csv-viewer-grid";
22import {
23 csvViewerExportFileName,
24 csvViewerSortResetKey,
25 isCsvDocumentSource,
26 resolveCsvViewerDialect,
27 type CsvDocumentSource,
28 type CsvTableSource,
29 type CsvViewerSource,
30} from "./csv-viewer-resource";
31import { useCsvResourceState, type CsvCellAddress } from "./csv-viewer-state";
32import type { CsvViewerHandle, CsvViewerProps } from "./csv-viewer-types";
33import {
34 useViewerControlsRegistration,
35 type ViewerControlsState,
36} from "./viewer-controls";
37import { joinEffectKey } from "@/lib/effect-key";
38
39export type {
40 CsvScrollOptions,
41 CsvViewerHandle,
42 CsvViewerProps,
43} from "./csv-viewer-types";
44
45export type CsvResourceContentProps = Omit<CsvViewerProps, "source"> & {
46 resource?: ViewerResource | null;
47 source?: CsvViewerSource;
48};
49type CsvResourceContentInternalProps = CsvResourceContentProps & {
50 frame?: boolean;
51};
52
53export type CsvViewerProviderProps = {
54 children: React.ReactNode;
55 resource: ViewerResource;
56};
57
58export type CsvViewerGridProps = Omit<CsvResourceContentProps, "resource">;
59
60export const CsvViewer = React.forwardRef<CsvViewerHandle, CsvViewerProps>(
61 function CsvViewer({ source, ...props }, ref) {
62 const resource = React.useMemo<ViewerResource | null>(
63 () =>
64 source && isCsvDocumentSource(source)
65 ? createViewerResource(source)
66 : null,
67 [source],
68 );
69 return (
70 <CsvResourceContent
71 {...props}
72 frame
73 ref={ref}
74 resource={resource}
75 source={source}
76 />
77 );
78 },
79);
80
81const CsvViewerResourceContext = React.createContext<ViewerResource | null>(
82 null,
83);
84
85export function CsvViewerProvider({
86 children,
87 resource,
88}: CsvViewerProviderProps) {
89 return (
90 <CsvViewerResourceContext.Provider value={resource}>
91 {children}
92 </CsvViewerResourceContext.Provider>
93 );
94}
95
96function useCsvViewerResource(): ViewerResource {
97 const resource = React.useContext(CsvViewerResourceContext);
98 if (!resource) {
99// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @retab/csv
  • @retab/utils
  • button
  • dropdown-menu
  • @retab/viewer-controls
  • @retab/use-keyed-layout-effect
  • @retab/use-mount-effect

Files it writes

  • registry/new-york-v4/ui/csv-viewer.tsx
  • registry/new-york-v4/ui/file-viewer-core.ts
  • registry/new-york-v4/ui/use-is-client.ts
  • registry/new-york-v4/lib/viewer-source.ts
  • registry/new-york-v4/lib/viewer-resource.ts
  • registry/new-york-v4/lib/viewer-download-actions.ts
  • registry/new-york-v4/lib/viewer-errors.ts
  • registry/new-york-v4/ui/csv-viewer-chrome.tsx
  • registry/new-york-v4/ui/viewer-error.tsx
  • registry/new-york-v4/ui/csv-viewer-download.ts
  • registry/new-york-v4/ui/csv-viewer-grid.tsx
  • registry/new-york-v4/ui/csv-viewer-row-patcher.ts
  • registry/new-york-v4/ui/csv-viewer-cell-classes.ts
  • registry/new-york-v4/ui/csv-row-store.ts
  • registry/new-york-v4/ui/csv-viewer-sort.ts
  • registry/new-york-v4/ui/csv-viewer-sort-worker.ts
  • registry/new-york-v4/ui/csv-viewer-sort.worker.ts
  • registry/new-york-v4/ui/fixed-grid-virtualization.ts
  • registry/new-york-v4/ui/fixed-grid-row-style.ts
  • registry/new-york-v4/ui/fixed-grid-template.ts
  • registry/new-york-v4/ui/fixed-grid-columns.ts
  • registry/new-york-v4/ui/fixed-grid-layout.ts
  • registry/new-york-v4/ui/fixed-grid-selection.ts
  • registry/new-york-v4/ui/fixed-grid-viewport.tsx
  • registry/new-york-v4/ui/header-aware-scrollbar.tsx
  • registry/new-york-v4/ui/viewer-scrollbar-css.ts
  • registry/new-york-v4/ui/csv-viewer-scrollbar.tsx
  • registry/new-york-v4/ui/csv-viewer-resource.ts
  • registry/new-york-v4/ui/csv-viewer-state.ts
  • registry/new-york-v4/ui/csv-viewer-style-scope.tsx
  • registry/new-york-v4/ui/csv-viewer-types.ts
  • registry/new-york-v4/ui/csv-viewer-worker.ts
  • registry/new-york-v4/ui/csv-viewer.worker.ts
  • registry/new-york-v4/ui/viewer-download.tsx
  • registry/new-york-v4/ui/fixed-grid-row-window.tsx
  • registry/new-york-v4/ui/fixed-grid-native-find-index.tsx

Facts

Registry
retab-ui
Type
registry:ui
Access
Free
Files written
36
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
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
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