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

# Plain HTML

> Add feedbackfun to any static HTML site with a single script tag.

## Installation

Add the following snippet before the closing `</body>` tag on every page where you want the widget:

```html theme={null}
<link rel="stylesheet" href="https://cdn.feedbackfun.com/feedbackfun-widget.min.css">
<script
  src="https://cdn.feedbackfun.com/feedbackfun-widget.min.js"
  data-feedbackfun-api-key="YOUR_API_KEY"
  data-feedbackfun-project-id="YOUR_PROJECT_ID">
</script>
```

The widget auto-initializes — no extra JavaScript needed.

## Full page example

```html theme={null}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Site</title>
</head>
<body>

  <h1>Welcome to my site</h1>

  <!-- feedbackfun widget -->
  <link rel="stylesheet" href="https://cdn.feedbackfun.com/feedbackfun-widget.min.css">
  <script
    src="https://cdn.feedbackfun.com/feedbackfun-widget.min.js"
    data-feedbackfun-api-key="YOUR_API_KEY"
    data-feedbackfun-project-id="YOUR_PROJECT_ID">
  </script>

</body>
</html>
```

## Custom trigger button

Hide the default floating button and use your own element as the trigger:

```html theme={null}
<button id="my-feedback-btn">Send feedback</button>

<link rel="stylesheet" href="https://cdn.feedbackfun.com/feedbackfun-widget.min.css">
<script
  src="https://cdn.feedbackfun.com/feedbackfun-widget.min.js"
  data-feedbackfun-api-key="YOUR_API_KEY"
  data-feedbackfun-project-id="YOUR_PROJECT_ID">
</script>

<script>
  // Override trigger after widget loads
  document.addEventListener('DOMContentLoaded', function () {
    window.feedbackfun?.setPrimaryColor('#6366f1');
  });
</script>
```

<Note>
  To use a custom trigger, set `triggerSelector` via the [npm package](/installation/npm-package) or configure it in your dashboard under project settings.
</Note>
