Available · v0.1.0
Source tabs
Switch related source or presentation modes with accessible tabs.
Interactive example
Usage
<SourceTabs items={[{id:"search",label:"Search & filter"},{id:"file",label:"Upload file"}]} selected={source} onSelect={setSource}>{panel}</SourceTabs>Properties
| Property | Type | Default | Description |
|---|---|---|---|
| items | {id,label}[] | Required | Stable IDs and human labels. |
| selected | string | Required | Controlled active item. |
| onSelect | (id)=>void | Required | Update host state. |
| children | ReactNode | — | Current panel content. |
| label | string | Views | Accessible tab-list name. |
Design and interaction
Search/filter is the default customer source. Switching the tab must not silently discard an imported file or selected customers.
Accessibility
Left/right arrows, Home/End, roving tabIndex, aria-selected and linked tab/panel IDs.
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