TidalUI

Column mapper preview

Match source columns to destination fields with sample values and duplicate protection.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/column-mapper

Import components/ui/tidal.css, components/ui/column-mapper.css. Wrap installed components in tidal-scope.

Preview

Column mapper component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/column-mapper.css";
import{TidalColumnMapper}from"./components/ui/column-mapper";
export default()=><div className="tidal-scope"><TidalColumnMapper fields={[{id:"example",label:"Demo"}]} onValueChange={() => {}} sources={[{id:"example",label:"Demo"}]} value={{}}/></div>;

API and props

TidalColumnMapper.fields (required)
ReadonlyArray<TidalColumnField>

Required fields value accepted by this exported component.

TidalColumnMapper.onValueChange (required)
(next: Record<string, string | undefined>, fieldId: string, event: ChangeEvent<HTMLSelectElement>) => void

Callback invoked when the value change interaction is proposed.

TidalColumnMapper.sources (required)
ReadonlyArray<TidalColumnSource>

Required sources value accepted by this exported component.

TidalColumnMapper.value (required)
Readonly<Record<string, string | undefined>>

Required value value accepted by this exported component.

TidalColumnMapper.allowDuplicateSources
boolean | undefined

Optional allow duplicate sources value accepted by this exported component.

TidalColumnMapper.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalColumnMapper.emptySample
ReactNode

Optional empty sample value accepted by this exported component.

TidalColumnMapper.errors
Readonly<Record<string, ReactNode>> | undefined

Optional errors value accepted by this exported component.

TidalColumnMapper.headerActions
ReactNode

Optional header actions value accepted by this exported component.

TidalColumnMapper.headingLevel
2 | 3 | 4 | 5 | 6 | undefined

Optional heading level value accepted by this exported component.

TidalColumnMapper.missingSample
ReactNode

Optional missing sample value accepted by this exported component.

TidalColumnMapper.placeholder
string | undefined

Optional placeholder value accepted by this exported component.

TidalColumnMapper.readOnly
boolean | undefined

Optional read only value accepted by this exported component.

TidalColumnMapper.sampleLabel
string | undefined

Optional sample label value accepted by this exported component.

TidalColumnMapper.showValidation
boolean | undefined

Optional show validation value accepted by this exported component.

TidalColumnMapper.summary
((mapped: number, total: number) => ReactNode) | undefined

Optional summary value accepted by this exported component.

TidalColumnMapper.title
ReactNode

Optional title value accepted by this exported component.

TidalColumnMapper.unavailableColumnLabel
string | undefined

Optional unavailable column label value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas