Available · v0.2.1

Mapping table

Review field mapping in small categories and source examples.

Interactive example

Loading Polaris components…

Usage

<MappingTable groups={fieldGroups} fields={fields} columns={headers} mapping={mapping} examples={sourceRow} onChange={setMapping} />

Properties

PropertyTypeDefaultDescription
groups{title,icon,fields}[]RequiredRoughly 5–7 related fields per category.
fieldsRecord<string,string>RequiredDestination IDs and labels.
columnsstring[]RequiredReal uploaded headers.
mappingRecord<string,string>RequiredControlled assignments.
examplesRecord<string,unknown>—First actual source row.
onChange(mapping)=>voidRequiredUpdates source only.

Design and interaction

Review categories through disclosure. Show destination, source column and a real example. Mapping never writes native business records. Use native chevron and arrow icons in fixed, centered columns. Preserve the source-to-field alignment when categories expand.

Accessibility

Native disclosure and labeled selects. Logical keyboard order; examples hide on narrow screens.

Implementation and ownership

Source: Kaupvik Website, packages/polaris. React client component; controlled host data. No API credentials or merchant transport are included. Host applications own authentication, validation, localization, errors and persisted preferences. Graph nodes use native Shopify identities; diagram positions are presentation only.

Tokens and states

Native controls use Shopify attributes and inherit the host’s design system. Kaupvik layout tokens: --kp-surface, --kp-surface-subdued, --kp-ink, --kp-ink-subdued, --kp-border, --kp-accent, --kp-focus, --kp-radius, --kp-space. Override only within the product surface. Loading, error and empty states are distinct; host data is never invented to fill a preview.

Verification

Test keyboard and pointer operation, focus visibility, 375px and desktop layouts, reduced motion and server hydration. Test every product adapter independently before release. QO remains on its reviewed implementation until its own adoption release.

Related product patterns