Skip to content
GitHub (opens in a new tab)
SettingsScreen

Settings / Preferences

One person's chat preferences as a whole page, under a settings nav.

What a screen is

A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.

When to use

  • a person's own preferences page in a chat or assistant product
  • you want the whole page done, with loading and empty states, and only need to pass data and callbacks
  • a settings area where Preferences is one section of a settings nav

When not to use

  • workspace settings with billing, team and security — start from the settings pattern
  • a company or billing details form you will change — start from the settings-form pattern
  • only the memory list inside another page — MemoryPanel
  • only a model choice in a composer — ModelPicker

Usage

One person's chat preferences as a whole page: default model with Auto, language, appearance, chat tools, custom instructions and saved memories, under a settings nav. Import it once, pass the saved preferences and your callbacks; the SaveBar, loading skeletons and the empty memories state come with it.

<SettingsPreferencesScreen preferences={preferences} onSave={save} onNavigate={go} onForgetMemory={forget} workspace={{ name: "Northwind" }} user={{ name: "Maya Chen", email: "maya@northwind.example" }} />
import { SettingsPreferencesScreen } from "agentic-ds-kit";

export default function PreferencesPage({ preferences, loading }) {
  // The screen renders its own settings nav and <main>: don't wrap it in another main.
  return (
    <SettingsPreferencesScreen
      preferences={preferences}            // { model, language, appearance, tools, instructions, memories, options? }
      loading={loading}                    // Skeletons in the real layout
      empty={preferences?.memories.length === 0}
      onSave={(next) => savePreferences(next)}  // a promise shows "Saving", a rejection "Not saved"
      onNavigate={(to) => router.push(to === "app" ? "/" : to === "chat" ? "/chat" : `/settings/${to}`)}
      onForgetMemory={(id) => forgetMemory(id)}
      workspace={{ name: "Northwind" }}
      user={{ name: "Maya Chen", email: "maya@northwind.example" }}
    />
  );
}

Props

SettingsPreferencesScreen props, from the screen contract.
PropTypeDefaultNotes
preferencesobject—{ model: string, language: string, appearance: "light" | "dark" | "system", tools: string[], instructions: { enabled: boolean, aboutYou: string, style: string }, memories: { id, content, source?, age? }[], options?: { models: PickerModel[], languages: { value, label }[], tools: { value, title, description?, disabled? }[] } } The saved preferences. Sample data (and sample options) when omitted. A new object replaces the draft. Put { id: "auto", name: "Auto" } first in options.models to offer Auto.
onSavefunction—(preferences: { model, language, appearance, tools, instructions }) => void | Promise<void>. From the SaveBar's Save changes or Enter in the form. A promise shows the saving state; a rejection shows Not saved and keeps the draft.
onNavigatefunction—(destination) => void. destination is "general" | "preferences" | "notifications" | "privacy" | "billing" | "connectors" (settings nav rows), "app" (Back to app) or "chat" (Start a chat on the empty memories state).
onForgetMemoryfunction—(id) => void. Called after the Forget confirm in MemoryPanel's AlertDialog; the screen drops the row at once. Not part of Save.
workspaceobject—{ name: string, icon?: KitIcon } Settings nav brand. Example workspace when omitted.
userobject—{ name: string, email?: string, src?: string } Account menu at the foot of the settings nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one). Example person when omitted.
loadingbooleanfalseNav and PageHeader stay; each FieldSet keeps its legend with Skeleton shapes where its controls go; MemoryPanel shows its loading rows; no SaveBar.
emptybooleanfalseNo saved memories: the Memory card shows kit Empty (first-use) "No memories yet" with Start a chat. Also shown when memories is [].
classNamestring—On the root layout-shell.

States

  • page: default, loading, empty
  • save: saved, dirty (SaveBar lists the changed fields), saving, error (Not saved. Try again.)
  • nav: SideNav (wide), Drawer (below --grid-breakpoint-md)

Accessibility

  • Renders its own <main> (named Settings: Preferences); the settings SideNav is an aside named Settings. Don't wrap the screen in another main
  • PageHeader title is the page h1; Card and FieldSet legends name the groups
  • Chat tools are a TileGroup selection=multiple: a group of role=checkbox buttons with aria-checked
  • Appearance is a SegmentedControl: role=radiogroup named Appearance, role=radio per option, arrow keys move
  • Each Forget button is named by its memory ("Forget: Prefers metric units") and confirms in a kit AlertDialog
  • Below --grid-breakpoint-md the nav opens from an IconButton named Settings sections into a kit Drawer (titled with the workspace, one Close); picking a row closes it
  • loading sets aria-busy on main and the Skeletons say Loading preferences once
  • SaveBar comes after the form in tab order and its status is a polite live region
  • No motion of its own; kit pieces (Drawer, AlertDialog, Skeleton, TileGroup) honour prefers-reduced-motion

Responsive

  • Wide: SideNav on the canvas, the page on the inset panel (layout-shell--inset)
  • Below --grid-breakpoint-md: the page alone; the settings nav moves into a left kit Drawer
  • Below 40rem of FieldSet width (--grid-breakpoint-sm), each legend and description sit above their controls
  • Below --grid-breakpoint-sm, Select and Textareas switch to lg; chat tool tiles stack one per row (TileGroup auto-fit)
  • Dark mode follows the root theme; semantic tokens only

Do not

  • Do not copy the screen's parts into a local cousin; change it through its props or start from the settings pattern
  • Do not wrap it in an app shell or another main
  • Do not add a second solid primary Button; Save changes is the only one
  • Do not forget a memory without the AlertDialog
  • Do not use raw hex

Built from

  • Pattern
    →

    Settings

    A settings nav in two groups (Workspace, You) beside each section, with a scope line under the title; an index page of two lists at 390.

  • Pattern
    →

    Settings form

    Company billing details in grouped fields, with a sticky save bar.

  • Component
    →

    MemoryPanel

    Facts an agent has stored: search, add, pin, edit or forget them (confirmed in an AlertDialog), and see which ones this thread used.

  • Component
    →

    ModelPicker

    Choose which model an agent or chat uses: grouped by vendor, with context window and cost tier, recommended models, and disabled models that keep their reason.