CSV preview preview
Inspect parsed rows and field-level validation messages before an import.
pro · Data · composite
When to use
- Use it when a page needs inspect parsed rows and field-level validation messages before an import.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.
Alternatives
- Choose data-table instead when sortable column controls, native row selection and a scrollable table is the actual interface need, rather than csv preview.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/csv-previewImport components/ui/tidal.css, components/ui/csv-preview.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/csv-preview.css";
import{TidalCsvPreview}from"./components/ui/csv-preview";
export default()=><div className="tidal-scope"><TidalCsvPreview columns={[{id:"example",label:"Demo"}]} rows={[{id:"example",rowNumber:"value",cells:{}}]}/></div>;API and props
TidalCsvPreview.columns (required)ReadonlyArray<TidalCsvColumn>Required columns value accepted by this exported component.
TidalCsvPreview.rows (required)ReadonlyArray<TidalCsvRow>Required rows value accepted by this exported component.
TidalCsvPreview.allButtonPropsOwnedButtonProps | undefinedOptional all button props value accepted by this exported component.
TidalCsvPreview.descriptionReactNodeOptional description value accepted by this exported component.
TidalCsvPreview.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalCsvPreview.exportButtonPropsOwnedButtonProps | undefinedOptional export button props value accepted by this exported component.
TidalCsvPreview.exportButtonRefRef<HTMLButtonElement> | undefinedOptional export button ref value accepted by this exported component.
TidalCsvPreview.fileNameReactNodeOptional file name value accepted by this exported component.
TidalCsvPreview.headingLevel2 | 3 | 4 | 5 | 6 | undefinedOptional heading level value accepted by this exported component.
TidalCsvPreview.issuesButtonPropsOwnedButtonProps | undefinedOptional issues button props value accepted by this exported component.
TidalCsvPreview.labelsPartial<{ all: string; issues: string; export: string; exporting: string; row: string; empty: string; noIssues: string; missing: string; valid: string; errors: string; warnings: string; invalid: string; unavailableTotal: string; table: string; validation: string; }> | undefinedOptional labels value accepted by this exported component.
TidalCsvPreview.onExportIssues((rows: readonly TidalCsvRow[], event: MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the export issues interaction is proposed.
TidalCsvPreview.onViewChange((view: TidalCsvView, event: MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the view change interaction is proposed.
TidalCsvPreview.pendingboolean | undefinedOptional pending value accepted by this exported component.
TidalCsvPreview.summary((shown: number, supplied: number, total: number | undefined) => ReactNode) | undefinedOptional summary value accepted by this exported component.
TidalCsvPreview.titleReactNodeOptional title value accepted by this exported component.
TidalCsvPreview.totalRowsnumber | undefinedOptional total rows value accepted by this exported component.
TidalCsvPreview.viewTidalCsvView | undefinedOptional view value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.