npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-settings-page.json --yesSettings page
ProA settings page that covers the app, with a close control at its top end, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
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>
}
/>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-settings-page.json --yesAdd the Goop Settings page to this project. The install steps are at https://goop.so/docs/install.mdUsage
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).
onClosegoes back where the settings were opened from.- height, width, padding, gap, corner, border, background, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| 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)
- data-slot values (to select a part by): settings-page, settings-page-close, settings-page-column, settings-page-content, settings-page-header, settings-page-header-slot, settings-page-heading, settings-page-nav, settings-page-nav-column, settings-page-sections, settings-page-sheet, settings-page-sub-nav, settings-page-trigger
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.