Component libraryColumn mapper
Column mapper
ProMatch source columns to destination fields with sample values and duplicate protection.
npx shadcn@latest add @tidal-pro/column-mapperInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/column-mapper.css, components/ui/native-select.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
sources and fields require unique nonempty IDs. Controlled value maps destination IDs to source IDs; onValueChange proposes a fresh record, field ID and native event without importing or reading a file. Unmapping deletes that field key while preserving unrelated mapping keys. Each field has a label, optional description/required/disabled state, native select props and ref. Native onChange runs first and prevention cancels the proposal. Duplicate source use is prevented by default; allowDuplicateSources opts in. Unknown selected sources and duplicate controlled values receive visible linked errors. Required empty errors appear with showValidation; native required validation always applies. Optional title, headerActions, errors, disabled/readOnly, placeholder/sample labels, empty/missing samples, unavailableColumnLabel, summary formatter, headingLevel and native root attributes/ref. The component composes TidalNativeSelect and retains native form semantics. No file read, import, request, storage or data mutation occurs.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.