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

# navigate()

> Send the user to a place inside Attio from an event handler.

```js theme={"system"}
import {navigate} from "attio/client"
```

`navigate` takes a [destination](./overview) and goes there in the current tab. For text the user clicks, prefer [`AttioLink`](./attio-link), which gives them a real link.

Available everywhere your client code runs: pages, record tabs, dialogs, record actions and the workspace settings page.

## Example

```tsx src/app/extensions/create-follow-up/extension.tsx theme={"system"}
import {Extensions, navigate, Destinations, showToast} from "attio/client"

import {createFollowUpDeal} from "./create-follow-up-deal.server"

export default Extensions.defineExtension({
  type: "record-action",
  id: "create-follow-up",
  label: "Create follow-up deal",
  icon: "Plus",
  objects: "deals",
  onTrigger: async ({recordId}) => {
    const newDealId = await createFollowUpDeal(recordId)
    await showToast({title: "Follow-up created", variant: "success"})
    navigate(Destinations.record({recordId: newDealId, object: "deals"}))
  },
})
```

From the workspace settings page, where `AttioLink` isn't available, a button is the way to offer a link:

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

import schema from "./schema"

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

  return (
    <Form>
      <Section title="Dashboard">
        <Button
          title="Deal health dashboard"
          description="Open the dashboard page to see health across every open deal."
          label="Open dashboard"
          onClick={() => navigate(Destinations.appPage("dashboard"))}
        />
      </Section>
    </Form>
  )
})
```

## Leaving a dialog

If `navigate` is called while one of your app's dialogs is open, the user is asked to confirm before the dialog closes and the navigation happens. Cancelling leaves them in the dialog. This is the one place navigation prompts; from pages, tabs and actions it is immediate.

## API

```ts TypeScript theme={"system"}
function navigate(destination: Destination): void
```

## Arguments

<ParamField path="destination" type="Destination" required>
  Where to go, built with [`Destinations`](./overview#destinations).

  If the destination can't be resolved, nothing happens and an error is logged to the browser
  console. `navigate` never throws.
</ParamField>
