Skip to content
animorio
IT
All components

CSV column mapper

Forms, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.4 KBGSAP 28 KBFreeDownload the zip

The step of an import where the columns of a CSV file are matched to the app’s fields: the automatic match reads the rows one after the other and runs a wire from every column it recognises to its field; the one it cannot place stays amber and asks for a choice. Once the field is chosen, “Import 1,284 rows” lights up, fills and confirms with a tick.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "CSV column mapper" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>CSV column mapper</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the step of a CSV import where the file's columns are matched to the app's fields: the automatic
         match wires up the ones it recognises, the one it cannot place asks for a choice, then Import lights up -->
    <section class="cm" data-cm aria-labelledby="cm-title">
      <header class="cm__head">
        <span class="cm__file" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 3.500h7l4 4V19a1.500 1.500 0 0 1-1.500 1.500h-9.500A1.500 1.500 0 0 1 5.500 19V5A1.500 1.500 0 0 1 7 3.500Z"></path><path d="M14 3.500v4h4M9 12.500h6M9 16h6"></path></svg></span>
        <span class="cm__name"><b id="cm-title">customers.csv</b><span>1,284 rows</span></span>
        <span class="cm__left" aria-live="polite"><span data-left>Matching columns</span></span>
      </header>
      <ul class="cm__list">
        <li class="cm__row" data-row data-guess="Full name">
          <span class="cm__src"><code>full_name</code><span>Ada Moretti</span></span>
          <svg class="cm__wire" viewBox="0 0 44 12" aria-hidden="true"><path class="wl" pathLength="1" d="M2 6h38"></path><path class="wh" d="M36.500 2.500 40.500 6l-4 3.500"></path></svg>
          <button class="cm__dst" type="button" data-dst><span class="cm__roll"><span data-label>Choose field</span></span><svg viewBox="0 0 12 12" aria-hidden="true"><path d="m3 4.500 3 3 3-3"></path></svg></button>
        </li>
        <li class="cm__row" data-row data-guess="Email">
          <span class="cm__src"><code>e-mail</code><span>ada@halden.studio</span></span>
          <svg class="cm__wire" viewBox="0 0 44 12" aria-hidden="true"><path class="wl" pathLength="1" d="M2 6h38"></path><path class="wh" d="M36.500 2.500 40.500 6l-4 3.500"></path></svg>
          <button class="cm__dst" type="button" data-dst><span class="cm__roll"><span data-label>Choose field</span></span><svg viewBox="0 0 12 12" aria-hidden="true"><path d="m3 4.500 3 3 3-3"></path></svg></button>
        </li>
        <li class="cm__row" data-row data-guess="Phone">
          <span class="cm__src"><code>tel</code><span>+39 02 5550 142</span></span>
          <svg class="cm__wire" viewBox="0 0 44 12" aria-hidden="true"><path class="wl" pathLength="1" d="M2 6h38"></path><path class="wh" d="M36.500 2.500 40.500 6l-4 3.500"></path></svg>
          <button class="cm__dst" type="button" data-dst><span class="cm__roll"><span data-label>Choose field</span></span><svg viewBox="0 0 12 12" aria-hidden="true"><path d="m3 4.500 3 3 3-3"></path></svg></button>
        </li>
        <li class="cm__row" data-row data-guess="">
          <span class="cm__src"><code>org_2</code><span>Halden Studio</span></span>
          <svg class="cm__wire" viewBox="0 0 44 12" aria-hidden="true"><path class="wl" pathLength="1" d="M2 6h38"></path><path class="wh" d="M36.500 2.500 40.500 6l-4 3.500"></path></svg>
          <button class="cm__dst" type="button" data-dst><span class="cm__roll"><span data-label>Choose field</span></span><svg viewBox="0 0 12 12" aria-hidden="true"><path d="m3 4.500 3 3 3-3"></path></svg></button>
        </li>
      </ul>
      <button class="cm__go" type="button" data-go disabled>
        <span class="cm__fill" data-fill aria-hidden="true"></span>
        <svg class="cm__check" viewBox="0 0 16 16" aria-hidden="true"><path data-check pathLength="1" d="m3.500 8.300 3 3 6-6.600"></path></svg>
        <span class="cm__gotext"><span data-golabel>Import 1,284 rows</span></span>
      </button>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

30 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “CSV column mapper” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On white, a card: the file icon, “customers.csv”, “1,284 rows” and the state on the right. Four rows: on the left the column’s name as it is in the file, in a code typeface (“full_name”, “e-mail”, “tel”, “org_2”), with a sample value below; on the right the app’s field, a button that first says “Choose field”. As soon as it opens the match starts: a pale blue light passes over the rows one after the other, and for every column it recognises a blue wire draws itself up to the field, the arrowhead snaps forward and the field takes colour and rolls to “Full name”, “Email”, “Phone”. The last one, “org_2”, has no place: its field turns amber with a small shake and the state says “1 column left”. Press the field and it moves to the first free one, “Company” (then “Job title”, “Don’t import”): the wire draws, the state says “All columns matched” and the button at the bottom goes from grey to blue with a bounce. “Import 1,284 rows” fills from the left, then says “1,284 contacts imported” with the tick drawing itself. In the demo, after a moment, it starts again.

How it works

The state lives in the rows

Each row knows which field it has (or none, or “Don’t import”). One function counts the ones with no field and from that decides the words at the top, the colour and whether Import is active.

The automatic match

One delayed call per row, SCAN seconds apart: it lights the row (a CSS variable going from 1 to 0) and, if the column has a guessed field, assigns it.

The wire

An SVG line with pathLength 1: stroke-dashoffset from 1 to 0 in DRAW seconds; the head is a second path that snaps in when the line has almost arrived. Removing the field pulls the line back.

Choosing

A click on the field moves it to the next one no other column has taken; “Don’t import” is always free. The words roll inside a one-line window.

Importing

A pale veil inside the button grows with scaleX for IMPORT seconds; at the end the words roll to the confirmation and the tick draws itself, with pathLength 1 too.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#2f6bffThe colour of the wires, of the matched fields and of Import.
WARNscript.js#d9790bThe colour of the column still to choose.
SCANscript.js0.26The seconds between one row and the next in the automatic match.
DRAWscript.js0.45How long the wire takes to draw from a column to its field.
IMPORTscript.js1.5How long the import lasts, in seconds.
SPRINGscript.js1How much the fields and the button bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer chooses the missing field and imports.

Try them in the Playground

When to use it

In the import of a CRM, a newsletter tool, a back office or a shop: after uploading the file and before importing, when someone has to say which column goes into which field.

On phones

The same card, as wide as the screen minus the margins: under 360 pixels the wire shortens to 30 pixels, long column and field names are cut with an ellipsis, and the fields stay 32 pixels tall, easy for a finger.

With reduced motion

No passing light and no drawing wires: the recognised columns are already connected on opening, the fields change words and colour in one step, the button fills with a fade. The demo does not move by itself.

Pitfalls

  • The file, the columns and the contacts are made up and nothing is imported: in a real app the columns come from the uploaded file and the guessed fields from comparing the names.
  • A line with round caps and a full stroke-dashoffset leaves a dot: until it is connected, the line has zero opacity.
  • The column to choose is not told by amber alone: the field says “Choose field” and the state at the top counts how many are missing.
  • Two columns cannot end up in the same field: the cycle of fields skips the ones already taken; only “Don’t import” can repeat.
  • The demo’s pass starts when the match ends and ends with Import, which starts the match again: so on every pass pointer and rows stay in time, even when the durations change.
  • GSAP rounds the pixels of stroke-dashoffset: autoRound is turned off at the top of the script.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.4 KB; the libraries: GSAP 28 KB.

Testing

Tested on 24 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All components