Settings.defineWorkspacePage() defines the page where workspace admins configure your app’s settings. It takes the settings schema and a render callback.
File location
The page must be the default export of a file insrc/app/settings/, conventionally src/app/settings/page.tsx, so the CLI can discover it.
Example
src/app/settings/page.tsx
Settings.useForm with the same schema to get form components typed against it.
Arguments
The schema built with
Settings.defineWorkspaceSchema, imported
from your schema file.A render callback returning the settings page. Use
Settings.useForm inside it,
and wrap the content in the <Form> component it returns. See Supported
components.Supported components
A settings page can render anyattio/client component alongside the components returned by Settings.useForm. The direct children of <Form> should be <Section />s, so put everything inside one. Non-admins see the whole page read-only.
Attio doesn’t render these on a settings page, at any depth:
- Inputs from the regular
useForm. OnlySettings.useForminputs save settings. <Button />. Use the<Button />returned bySettings.useForminstead.<EmptyState /><LoadingState />