Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Open-source widget to collect feedback anywhere on your website. Lightweight and tiny. That’s it.

License

NotificationsYou must be signed in to change notification settings

rowyio/feedbackfin

Repository files navigation

A tiny widget to collect feedback anywhere on your website. That’s it.

WebsiteDiscordTwitter

npm versionPackage size

Demo GIF

Try the widget ↗

Quick Start

  1. Load the widget on your page:

    <scriptsrc="https://unpkg.com/feedbackfin@^1"defer></script>
  2. Setup awebhook URL (read instructions in the next section) and configure that in the script. Optionally, add anyuser info that you want to pass in from the website:

    <script>window.feedbackfin={config:{}, ...window.feedbackfin};window.feedbackfin.config.url="https://rowy-hooks.run.app/wh/...";window.feedbackfin.config.user={name:"...",email:"..."};</script>
  3. Set a button to open the widget:

    <buttondata-feedbackfin-button>Feedback</button>

Setting up a webhook URL

This is the URL to send the feedback to. The widget will make a POST request tothis URL with the feedback data as a JSON body.

Generate a webhook URL easily using Rowy's low-code platform and manage feedback data on a collaborative spreadsheet-UI. Optionally, you can further automate on incoming feedback with Rowy's built-in code-editor (eg: notify on team slack/discord, email follow up etc).

End-to-end video instructions on thewebsite ↗

Options

Options are set in thewindow.feedbackfin.config object:

url

The URL to send the feedback to. The widget will make a POST request to this URLwith the data as a JSON body. SeeSetting up a webhook URL above.

user

An object whose contents will be submitted as part of the form. Note:feedbackType,message, andtimestamp are reserved fields and will beoverwritten by form values.

Typically:

window.feedbackfin.config.user={name:"...",email:"...",};

disableErrorAlert

Optionally, disables displayingalerts if noURL is set or the request fails. Default:disableErrorAlert: false

How it works

When the script is loaded, it looks for any elements with thedata-feedbackfin-button attribute and opens the widget when any of thoseelements are clicked.

<buttondata-feedbackfin-button>Feedback</button>

Thewindow.feedbackfin object exposes theopen,close, andsubmitmethods, so they can also be called directly.

<buttononclick="window.feedbackfin.open(event)">Feedback</button>

The widget usesevent.target to compute its position usingFloating UI.

Customization

The widget is attached just before the closing</body> tag when it is open andrespects your page’sfont-family. Styles are attached just before the opening<head> tag so your customizations take precedence.

You can customize the widget’s appearance by:

  • Overridingthe CSS variables.

    For example, you can change the primary button color using:

    :root {--feedbackfin-primary-color:#007aff;--feedbackfin-primary-color-text:#fff;}
  • Overridingthe CSS rules.Class names are prefixed withfeedbackfin__.

Dark mode

Dark mode is activated when either:

  • the user sets their system theme to dark
    i.e.@media (prefers-color-scheme: dark) is true, or

  • any parent element has adata-theme attribute whose value containsdark.
    Example:<body data-theme="dark">

Dark mode colors are set using CSS variables. You can override them with:

@media (prefers-color-scheme: dark) {:root {    ...;  }}[data-theme*="dark"] {  ...;}

Accessibility

This widget is built using standard HTML form elements with the appropriatelabels.

Focus is trapped within the widget when it is open usingfocus-trap. Be careful when nestingthis widget inside another element with a focus trap.

Contributing

Contribute to Feedback Fin with issues and pull requests inthe GitHub repo.

Support


[8]ページ先頭

©2009-2025 Movatter.jp