Skip to main content
This component is returned by useWorkspaceSettingsForm().

Example

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

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

function Page() {
  const {Form, Toggle} = 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).