> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <Toggle />

> A toggle input field.

<img className="dark:hidden" width="720" height="440" noZoom src="https://mintcdn.com/attio/jXl5_SFM_Le7vWWN/images/workspace-settings-toggle.png?fit=max&auto=format&n=jXl5_SFM_Le7vWWN&q=85&s=2eac4e372b211a822e4059c1350b2d63" data-path="images/workspace-settings-toggle.png" />

<img className="hidden dark:block" width="720" height="440" noZoom src="https://mintcdn.com/attio/jXl5_SFM_Le7vWWN/images/workspace-settings-toggle-dark.png?fit=max&auto=format&n=jXl5_SFM_Le7vWWN&q=85&s=86d29e0eead2b8d301e3ece661a5fad1" data-path="images/workspace-settings-toggle-dark.png" />

<Note>
  This component is returned by
  [`Settings.useForm()`](../../settings/use-form).
</Note>

## Example

```tsx src/app/settings/page.tsx theme={"system"}
import React from "react"
import {Settings} from "attio/client"

import schema from "./schema"

export default Settings.defineWorkspacePage(schema, () => {
  const {Form, Toggle} = Settings.useForm(schema)

  return (
    <Form>
      <Toggle
        label="Enable notifications"
        name="notifications_enabled"
        description="Receive notifications when important events occur."
      />
    </Form>
  )
})
```

## Props

<ParamField path="label" type="string" required>
  The label of the input field.
</ParamField>

<ParamField path="description" type="string">
  An optional description that provides additional context about the toggle.
</ParamField>

<ParamField path="name" type="string" required>
  The key of the `boolean` value of the input field in your [settings schema](../../settings/define-workspace-schema).

  e.g. `"notifications_enabled"`
</ParamField>

<ParamField path="disabled" type="boolean">
  Whether or not the field should be disabled.

  Defaults to `false` (not disabled).
</ParamField>
