Kaupvik KeelKaupvik Keel
Open Source · v0.3.0

Side drawer

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

Interactive example

Loading Polaris web 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 & 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.