Available · v0.3.0

Side drawer

Review and confirm a staged form in a rounded adaptive side panel.

Interactive example

Loading Polaris components…

Usage

<SideDrawer title="Review & edit row" onClose={close} actions={<><s-button onClick={close}>Cancel</s-button><s-button variant="primary" onClick={save}>Confirm changes</s-button></>}><s-text-field label="Company name" /></SideDrawer>

Properties

PropertyTypeDefaultDescription
titlestringRequiredDialog heading.
descriptionstring—Purpose and draft boundary.
childrenReactNodeRequiredNative form controls.
actionsReactNodeRequiredCancel and confirm native buttons.
onClose()=>voidRequiredDiscard unconfirmed draft.
surfaceSelectorstring[data-kp-drawer-surface]Host content to resize.

Design and interaction

Kaupvik composition using the native HTML dialog focus boundary and Shopify form controls. Desktop reserves dock width; narrow screens use a modal panel. Host owns staged values and must commit only on confirm. Host coordinates other fixed launchers while open; conversation state remains owned by Harbor. Never call business APIs from this shell.

Accessibility

Native modal focus trap, Escape cancellation, titled/described dialog and focus return. Closing must be equivalent to Cancel. Mobile backdrop, overflow scrolling, reduced motion and minimum target sizes are preserved.

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