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

# React

> Load the Feddy widget from a React component and open it from your own button.

By the end of this page your app will have a Support button that opens Feddy, and a message sent from it will be sitting in your inbox. It takes about five minutes.

## Before you start

* A Feddy project and its project ID. You'll find the ID under **Settings → Install** in the dashboard. No project yet? [Create one](/docs/getting-started/create-a-project) first.
* Nothing to install from npm. The widget is one script loaded from Feddy's servers when your component mounts.

<Steps>
  <Step title="Add a component">
    The component loads the script once, then tells Feddy which project this is. `launcher: false` turns off the floating chat button so your own button is the way in:

    ```jsx Support.jsx theme={null}
    import { useEffect } from 'react'

    export function Support() {
      useEffect(() => {
        const el = document.createElement('script')
        el.src = 'https://core.feddy.app/sdk/feddy.js'
        el.onload = () => Feddy.init({ projectId: 'fd_XXXXXXXXXXXXXXXX', launcher: false })
        document.body.append(el)
      }, [])
      return <button onClick={() => Feddy.open()}>Support</button>
    }
    ```

    `init` only takes effect once per page. If React runs the effect twice in development, the second call does nothing. Leave out `launcher: false` if you'd rather have the floating button instead of your own.

    <Note>
      **The project ID isn't a secret.** It's visible in your bundle, so anyone can find it, and that's fine: it only tells Feddy which inbox a message belongs to. Commit it like any other setting. There's nothing to protect, so keep it out of your secrets file.
    </Note>
  </Step>

  <Step title="Render it once">
    Put `<Support />` somewhere that stays mounted, such as your app shell or settings page. The widget keeps its own styles, so it never clashes with your CSS.
  </Step>

  <Step title="Send yourself a message">
    Open the page, click the button, and send a message. Then open your inbox at [dash.feddy.app](https://dash.feddy.app): it's there, with the page URL and browser alongside.

    Reply from the inbox. Back on the page, the reply appears in the panel.

    <Check>
      That's the whole loop: a visitor writes in, you answer, and the answer reaches them on your site.
    </Check>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Identify users" href="/docs/guides/identify-users">
    Tell Feddy who's logged in, so you see their name in the inbox and replies can reach them by email.
  </Card>

  <Card title="Unread badge" href="/docs/guides/unread-badge">
    Show a count on your Support button when a reply is waiting.
  </Card>

  <Card title="Conversations" href="/docs/concepts/conversations">
    What you're looking at in the inbox, and what happens on its own.
  </Card>

  <Card title="Web SDK reference" href="/docs/reference/web">
    Every option and call in the widget.
  </Card>
</CardGroup>
