Annotated Layout
Two-column settings pages: one column for the title, explanation and help link, the other for sectioned field cards — the official Shopify settings-page pattern.
Real scenarios
The component as it is used in a product — not a specimen grid.
Explain on one side, edit on the other
The official settings-page skeleton: the annotation column explains each section and links to the docs, while the card column holds the live fields. Any change flashes the saved chip; under 768px the columns stack.
Notifications
Decide what your customers hear after each order — and from which voice.
The receipt customers forward to their accountant. Keep it quiet and factual.
Learn moreOne email a day instead of twenty — the number of orders, the money, the two things to fix.
Learn moreThe plain variant
Without the annotation the card runs full width — the section header moves inside, and the footer actions stay put.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| annotation | column | '1fr · 2fr' | The columns split 1:2; under 768px they stack with the annotation on top. |
| sectioned | card | 'true' | A sectioned card: each field group separated by its own rule. |
| help-link | link | null | A «learn more» link with an external icon closing the annotation column. |
Snippet
<div class="plal">
<div class="plal-note">
<h2>Notifications</h2>
<p>Decide what customers hear after each order.</p>
<a>Learn more ↗</a>
</div>
<div class="plal-card">
<label><input type="checkbox"> Order confirmation email</label>
<hr>
<label>Sender <select>…</select></label>
</div>
</div>
<style>
.plal { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.plal-note h2 { margin: 0; font: 600 16px/1.3 Inter, system-ui; color: #303030; }
.plal-card { border-radius: 12px; background: #FFF;
box-shadow: 0 1px 4px #00000012; padding: 16px; }
@media (max-width: 768px) { .plal { grid-template-columns: 1fr; } }
</style>
// resources/js/Pages/Settings/Notifications.tsx — the annotated
// layout page; the two-column skeleton is the React snippet.
import { Head } from '@inertiajs/react';
import AnnotatedLayout from '@/components/polaris/AnnotatedLayout';
export default function SettingsNotifications() {
return (
<>
<Head title="Notifications" />
{/* Save posts the section, then a back-end flash confirms it */}
<AnnotatedLayout />
</>
);
}
import { useState } from 'react';
import '@nabuxai/ui-core/css';
export default function AnnotatedLayout() {
const [confirm, setConfirm] = useState(true);
const [sender, setSender] = useState('shop');
const [flash, setFlash] = useState(false);
const touch = () => { setFlash(true); setTimeout(() => setFlash(false), 2200); };
return (
<div className="plal">
<div className="plal-note">
<h2>Notifications</h2>
<p>Decide what customers hear after each order.</p>
<a href="#">Learn more ↗</a>
</div>
<div className="plal-card">
<div className="plal-sec">
<label>
<input type="checkbox" checked={confirm} onChange={(e) => { setConfirm(e.target.checked); touch(); }} />
Order confirmation email
</label>
</div>
<div className="plal-sec">
<label>
Sender
<select value={sender} onChange={(e) => { setSender(e.target.value); touch(); }}>
<option value="shop">The shop, from its own address</option>
<option value="support">Support desk</option>
</select>
</label>
</div>
<div className="plal-foot">
{flash ? <span className="plal-flash">✓ Settings saved</span> : <small>Changes apply from the next order.</small>}
<button className="plal-save">Save</button>
</div>
</div>
<style>{`
.plal { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.plal-note h2 { margin: 0; font: 600 16px/1.3 Inter, system-ui; color: #303030; }
.plal-card { border-radius: 12px; background: #FFF; box-shadow: 0 1px 4px #00000012;
padding: 16px; display: grid; gap: 16px; }
.plal-foot { display: flex; align-items: center; gap: 12px; }
.plal-save { margin-inline-start: auto; block-size: 32px; padding-inline: 16px; border: none;
border-radius: 8px; background: #008060; color: #FFF; }
@media (max-width: 768px) { .plal { grid-template-columns: 1fr; } }
`}</style>
</div>
);
}
<!-- AnnotatedLayout.vue -->
<script setup lang="ts">
import { ref } from 'vue';
import '@nabuxai/ui-core/css';
const confirm = ref(true);
const sender = ref('shop');
const flash = ref(false);
let timer: ReturnType<typeof setTimeout> | undefined;
const touch = () => {
flash.value = true;
clearTimeout(timer);
timer = setTimeout(() => (flash.value = false), 2200);
};
</script>
<template>
<div class="plal">
<div class="plal-note">
<h2>Notifications</h2>
<p>Decide what customers hear after each order.</p>
<a href="#">Learn more ↗</a>
</div>
<div class="plal-card">
<div class="plal-sec">
<label>
<input v-model="confirm" type="checkbox" @change="touch()" />
Order confirmation email
</label>
</div>
<div class="plal-sec">
<label>
Sender
<select v-model="sender" @change="touch()">
<option value="shop">The shop, from its own address</option>
<option value="support">Support desk</option>
</select>
</label>
</div>
<div class="plal-foot">
<span v-if="flash" class="plal-flash">✓ Settings saved</span>
<small v-else>Changes apply from the next order.</small>
<button class="plal-save">Save</button>
</div>
</div>
</div>
</template>
<style scoped>
.plal { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.plal-note h2 { margin: 0; font: 600 16px/1.3 Inter, system-ui; color: #303030; }
.plal-card { border-radius: 12px; background: #fff; box-shadow: 0 1px 4px #00000012;
padding: 16px; display: grid; gap: 16px; }
.plal-foot { display: flex; align-items: center; gap: 12px; }
.plal-save { margin-inline-start: auto; block-size: 32px; padding-inline: 16px; border: none;
border-radius: 8px; background: #008060; color: #fff; }
@media (max-width: 768px) { .plal { grid-template-columns: 1fr; } }
</style>
<!-- AnnotatedLayout.svelte -->
<script lang="ts">
import '@nabuxai/ui-core/css';
let confirm = $state(true);
let sender = $state('shop');
let flash = $state(false);
let timer: ReturnType<typeof setTimeout> | undefined;
const touch = () => {
flash = true;
clearTimeout(timer);
timer = setTimeout(() => (flash = false), 2200);
};
</script>
<div class="plal">
<div class="plal-note">
<h2>Notifications</h2>
<p>Decide what customers hear after each order.</p>
<a href="#/">Learn more ↗</a>
</div>
<div class="plal-card">
<div class="plal-sec">
<label>
<input type="checkbox" bind:checked={confirm} onchange={touch()} />
Order confirmation email
</label>
</div>
<div class="plal-sec">
<label>
Sender
<select bind:value={sender} onchange={touch()}>
<option value="shop">The shop, from its own address</option>
<option value="support">Support desk</option>
</select>
</label>
</div>
<div class="plal-foot">
{#if flash}<span class="plal-flash">✓ Settings saved</span>{:else}<small>Changes apply from the next order.</small>{/if}
<button class="plal-save">Save</button>
</div>
</div>
</div>
<style>
.plal { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.plal-note h2 { margin: 0; font: 600 16px/1.3 Inter, system-ui; color: #303030; }
.plal-card { border-radius: 12px; background: #fff; box-shadow: 0 1px 4px #00000012;
padding: 16px; display: grid; gap: 16px; }
.plal-foot { display: flex; align-items: center; gap: 12px; }
.plal-save { margin-inline-start: auto; block-size: 32px; padding-inline: 16px; border: none;
border-radius: 8px; background: #008060; color: #fff; }
@media (max-width: 768px) { .plal { grid-template-columns: 1fr; } }
</style>