Kaupvik KeelKaupvik Keel
Open Source · v0.7.8

Settings layout

Compose settings with anchored sections or controlled route navigation and native cards.

Interactive example

Loading Polaris web components…

Usage

<SettingsLayout sections={[{id:"connection",title:"Store connection",children:<ConnectionSettings/>}]} />

Properties

PropertyTypeDefaultDescription
sections{id,title,icon?,href?,children?}[]RequiredStable IDs; href for route mode, children for anchor mode.
selectedstringOptionalControlled route mode; renders only current page children.
onNavigate(id,href)=>voidOptionalHost router callback; modifier-click preserves link behavior.
childrenReactNodeOptionalCurrent routed page with native cards.
collapseNavigationOnDrawerbooleanfalseTemporarily hide and inert navigation while a shared drawer is open; restore on close.

Design & interaction

Use native sections and controls. Explain only settings the merchant can act on. Navigation stays sticky on desktop and becomes a horizontal list on small screens. For many settings use selected + href + host onNavigate; current cards are route-owned, never hidden duplicate forms.

Accessibility

Anchor links work without scripting. IntersectionObserver updates aria-current in anchor mode; route mode uses aria-current=page and preserves keyboard/modifier-click links.

Open-source source

Available in github.com/Kaupvik/kaupvik-polaris ↗. Host apps supply authentication, native persistence, and read-back state.