Options

Options

Install without projectId

You can skip the projectId. You must to add your domain name from the Project setting on dashboard.

// ...
import { Feedback } from '@okie/feedback';
 
const App = () => {
  return (
    <Layout>
      <Feedback />
    </Layout>
  );
}

Custom the Feedback Button

Wrap whatever button or item you want to trigger the widget:

<Feedback>
  <button>Send Feedback</button>
</Feedback>
<Feedback>
  <Link>Send Feedback</Link>
</Feedback>

Submitters email

Pass the email of the currently authenticated user to the user prop:

// ...
import { Feedback } from '@okie/feedback';
 
const App = () => {
    
  return (
    <Layout>
      <Feedback user={currentUser.email} />
    </Layout>
  );
}

Build your own form

You can build your own form and submit the feedback to our API endpoint. Send a POST request to https://feedback.okie.one/api/feedback/create (opens in a new tab):

fetch('https://feedback.okie.one/api/feedback', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    projectId: "...",
    url: 'https://your-url',
    email: 'your@email.com',
    name: 'Your Name',
    message: 'Feedback Message',
    screenshot: 'url to screenshot image, or base64'
    metadata: '{}'
  })
})