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

# Link Accounts (Onboarding)

> Onboarding component which walks users through connecting business accounts.

The Link Accounts component is intended to be used during onboarding into an accounting experience, regardless of whether the business is additionally enrolling in bookkeeping services or not.
It will prompt users to connect all their business accounts in sequence and prompt them to confirm whether any accounts are personal and should be excluded.

```tsx theme={null}
<LinkAccounts onComplete={() => navigate('../overview')} />
```

***

Users will be first prompted to connect their bank.
![Link Accounts starting state](https://github.com/user-attachments/assets/5c3ee713-bc7c-41eb-98dc-08c9f03c3f34)

***

After connecting accounts, the component will show cards for each transaction as well as loading progress.
![Onboarding after linking](https://github.com/user-attachments/assets/fbb78255-6386-416d-9b6b-4d1af8a47e84)

***

Users will be prompted to confirm which accounts are used by their business.
![Confirming business accounts](https://github.com/user-attachments/assets/11344c86-c0d4-4708-88d8-33cfcd0c45ae)

### Properties

<ParamField body="onComplete" type="function">
  A function to navigate to the next screen in the onboarding flow.
</ParamField>

<ParamField body="plaidHostedLinkConfig" type="PlaidHostedLinkConfig">
  Configuration for using Plaid Hosted Link instead of the embedded Plaid modal. When provided, account linking opens a Plaid-owned page in the browser rather than displaying an embedded modal.

  <Expandable title="PlaidHostedLinkConfig properties">
    <ParamField body="isMobileApp" type="boolean">
      Set to `true` when the user will open the hosted link in an `ASWebAuthenticationSession` (iOS) or Android Custom Tab. This tells Plaid to use the correct redirect handling for mobile contexts.
    </ParamField>

    <ParamField body="redirectUri" type="string">
      Universal Link (iOS) or App Link (Android) that opens your app. Used when Plaid redirects from a third-party OAuth app (e.g., a bank's app) back to your app during app-to-app authentication.
    </ParamField>

    <ParamField body="completionRedirectUri" type="string">
      URI to redirect to after the user completes the Plaid hosted link flow (e.g., `myapp://plaid-complete`). Recommended for mobile apps to automatically close the hosted link session and return to your app. If not provided, the user sees a "Return to app" message and must navigate back manually.
    </ParamField>

    <ParamField body="navigateToHostedLink" type="(hostedLinkUrl: string) => void | Promise<void>" required>
      Callback function that navigates the user to the Plaid Hosted Link URL. This function receives the Plaid-owned URL and should open it in the device's browser or an in-app browser. Required for all hosted link configurations.
    </ParamField>
  </Expandable>
</ParamField>
