Side drawer
Review and confirm a staged form in a rounded adaptive side panel.
Interactive example
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
| Property | Type | Default | Description |
|---|---|---|---|
| title | string | Required | Dialog heading. |
| description | string | — | Purpose and draft boundary. |
| children | ReactNode | Required | Native form controls. |
| actions | ReactNode | Required | Cancel and confirm native buttons. |
| onClose | ()=>void | Required | Discard unconfirmed draft. |
| surfaceSelector | string | [data-kp-drawer-surface] | Host content to resize. |
Design & 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 any concurrent fixed launchers while open; host owns all API transport and persistence. 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.
Open-source source
Available in github.com/Kaupvik/kaupvik-polaris ↗. Host apps supply authentication, native persistence, and read-back state.