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

# Quickstart

> Integrate Trails in under 5 minutes

## Install

```shell npm theme={null}
npm install 0xtrails
```

```shell pnpm theme={null}
pnpm add 0xtrails
```

```shell yarn theme={null}
yarn add 0xtrails
```

```shell bun theme={null}
bun add 0xtrails
```

## Add a component

Pick the component that matches your use case and import it from `0xtrails/widget`:

```tsx theme={null}
import { Fund } from '0xtrails/widget'

export function Deposit() {
  return (
    <Fund
      apiKey="YOUR_API_KEY"
      to={{
        recipient: "0xYourAddress",
        currency: "USDC",
        chain: "base",
      }}
    />
  )
}
```

User deposits any token from any chain. Arrives as USDC on Base.

> [!NOTE]
>
> **Get an API key**: Sign up and create an API key on the [Trails Dashboard](https://dashboard.trails.build/landing)

## Components

| Component | Use case |
| - | - |
| `<Pay />` | Accept a fixed payment (e.g. 25 USDC) to a recipient |
| `<Fund />` | Deposit funds into a wallet, chain, or protocol |
| `<Swap />` | Cross-chain token exchange |
| `<Withdraw />` | Off-ramp or move funds out |
| `<Earn />` | DeFi yield deposits |

All are imported from `0xtrails/widget`.

## Starter Templates

> [card] [Live Demo](https://demo.trails.build/widget)
>
> Try it now

> [card] [React](https://github.com/0xsequence-demos/trails-starter)
>
> Starter kit

> [card] [Next.js](https://github.com/0xsequence-demos/trails-nextjs-starter)
>
> Starter kit

## Next Steps

> [card] [Pay](https://docs.trails.build/use-cases/pay.md)
>
> Stablecoin payments, merchant integration

> [card] [Swap](https://docs.trails.build/use-cases/swap.md)
>
> Cross-chain token swaps

> [card] [Fund](https://docs.trails.build/use-cases/fund.md)
>
> Protocol deposits, chain onboarding, built-in onramps

> [card] [Earn](https://docs.trails.build/use-cases/earn.md)
>
> Integrated DeFi yield deposits

***

**Full reference**: [SDK Configuration](https://docs.trails.build/sdk/configuration.md) · [API Reference](https://docs.trails.build/api-reference/introduction.md) · [Hooks](https://docs.trails.build/sdk/hooks.md)
