---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Settings page

A settings page that covers the app, with a close control at its top end, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `SettingsPage`.

## When to use

- A settings page that covers the app, with a close control at its top end.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Settings page on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-settings-page.json --yes
```

```text
Add the Goop Settings page to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import type { ReactNode } from 'react';
import { Field } from '@/components/ui/goop/field';
import { PageHeader, PageHeaderTitle } from '@/components/ui/goop/page-header';
import { Sidebar, SidebarContent } from '@/components/ui/goop/sidebar';
import { SidebarMenu, SidebarMenuItem } from '@/components/ui/goop/sidebar-group';
import { SidebarMenuButton } from '@/components/ui/goop/sidebar-menu-button';
import { TextInput } from '@/components/ui/goop/text-input';
import { SettingsPage } from '@/components/goop/patterns/settings-page';

function Settings({ topBar, onClose }: { topBar: ReactNode; onClose: () => void }) {
  return (
    <SettingsPage
      onClose={onClose}
      header={topBar}
      subNav={
        <Sidebar variant="settings" aria-label="Settings" shortcut={false}>
          <SidebarContent>
            <SidebarMenu>
              <SidebarMenuItem>
                <SidebarMenuButton size="lg" icon="tabler-outline:user-circle" href="#profile" isActive>
                  Profile
                </SidebarMenuButton>
              </SidebarMenuItem>
            </SidebarMenu>
          </SidebarContent>
        </Sidebar>
      }
      heading={<PageHeader><PageHeaderTitle>Profile</PageHeaderTitle></PageHeader>}
      sections={
        <ul>
          <Field as="li" label="Name" description="Your display name.">
            <TextInput defaultValue="Mira" />
          </Field>
        </ul>
      }
    />
  );
}
```

- Fits: account, settings (their recipes).
- `onClose` goes back where the settings were opened from.
- height, width, padding, gap, corner, border, background, text: add no class for these.

## API reference

### Options

- `arrangement?: SettingsPageArrangement` — The contract's arrangement (the catalogue's ids): Meadow draws `mode` alone, every other id as it.
- `header: ReactNode` — The page's top bar, the theme's TopBar: over the sections' list, or the bar over the content below the breakpoint.
- `heading?: ReactNode` — The open section's heading over its sections: the theme's PageHeader.
- `subNav?: ReactNode` — The list of the settings' sections, in the section column: the theme's Sidebar `variant="settings"` and its rows.
- `sections: ReactNode` — The open section's content, under its heading: its Field rows and lists, one block a section, 40 px apart.
- `align?: 'center' | 'start' = 'start'`
- `onClose?: () => void` — Called by the close control's press and by Escape (one no open layer took): leave the settings.
- `closeLabel?: string = 'Close settings'` — The close control's spoken name.
- `navigationOpen?: boolean` — Whether the sections are open in their sheet below the breakpoint, when the caller holds it.
- `defaultNavigationOpen?: boolean = false` — Whether the sections' sheet starts open, when the page holds it.
- `onNavigationOpenChange?: (open: boolean) => void` — Called as the sections' sheet opens or closes: by its control, its close control, Escape, the scrim, a section chosen in it, or the window reaching the breakpoint.
- `navigationLabel?: string = 'Settings sections'` — The sections' sheet's spoken name.
- `navigationTriggerLabel?: string = 'Show settings sections'` — The spoken name of the control that opens it.
- `navigationCloseLabel?: string = 'Close settings sections'` — Its close control's spoken name.
- `container?: HTMLElement | null` — Where the sections' sheet is drawn; the end of `<body>` when left out.

- State: navigationOpen (navigationOpen / defaultNavigationOpen / onNavigationOpenChange)

## Accessibility

- focus-visible: the browser's own (:focus-visible): write nothing

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Field](/themes/meadow/components/field): A form row that ties one control to its label and its description, as a settings row or a stacked form field.
- [Page header](/themes/meadow/components/page-header): The title block that opens a page, with its page-level actions.
- [Sidebar](/themes/meadow/components/sidebar): The app's main navigation down one side of the window.
- [Sidebar group](/themes/meadow/components/sidebar-group): A titled group of links in the sidebar, such as the notes of a day or your projects, that can fold open and closed.
