Skip to main content
The Workspace Settings API is experimental and may change in the future. Please don’t use it in production versions of your app.
This component is returned by experimental_useWorkspaceSettingsForm().

Example

workspace-settings.tsx
import React from "react";
import { experimental_useWorkspaceSettingsForm } from "attio/client";
import type { App } from "attio";

export const workspaceSettings: App.Settings.Workspace = {
	Page,
};

function Page() {
	const { Form, Toggle } = experimental_useWorkspaceSettingsForm();
	
	return (
		<Form>
			<Toggle 
				label="Enable notifications" 
				name="notifications_enabled"
				description="Receive notifications when important events occur."
			/>
		</Form>
	);
}

Props

label
string
required
The label of the input field.
description
string
An optional description that provides additional context about the toggle.
name
string
required
The path to the boolean value of the input field in your settings schema.e.g. "notifications_enabled", "sync.auto_start"
disabled
boolean
Whether or not the field should be disabled.Defaults to false (not disabled).