> ## 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.

# <Button />

> A button component.

![](https://mintcdn.com/attio/jXl5_SFM_Le7vWWN/images/workspace-settings-button.png?fit=max\&auto=format\&n=jXl5_SFM_Le7vWWN\&q=85\&s=16389384440f92921d90c7df75096aae)

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

Any buttons placed inside workspace settings will be rendered appropriately within the form layout.

The regular [`Button`](../button) from `attio/client` isn't supported on settings pages. Use this one instead.

## 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, Section, TextInput, Button} = Settings.useForm(schema)

  return (
    <Form>
      <Section title="General">
        <TextInput label="Display name" name="display_name" />
        <Button
          title="Reset to defaults"
          description="This will restore all settings to their default values."
          label="Reset"
          variant="destructive"
          onClick={() => {
            // code here
          }}
        />
      </Section>
    </Form>
  )
})
```

## Props

**title** `string` *required*

The title of the button section.

**description** `string`

An optional description that provides additional context about what the button does.

**label** `string` *required*

The text of the button.

**onClick** `() =\> void` *required*

A function that will be called if the user clicks the button.

**variant** `'primary' | 'secondary' | 'secondary-destructive' | 'ghost' | 'destructive'`

The style of the button.

Defaults to `"secondary"`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.