@codebar-ag/feedback-widget
v1.0.0
Published
Self-hosted feedback widget: full-page screenshots with annotations, diagnostics and drafts. Vanilla TypeScript, Shadow DOM, no runtime dependencies in the core.
Maintainers
Readme
@codebar-ag/feedback-widget
A feedback widget for websites and web apps: visitors describe a problem, mark it on a full-page screenshot and send it, together with browser data and console errors. Vanilla TypeScript in a Shadow DOM, 18 KB gzip, no runtime dependencies.
It sends to the self-hosted codebar Feedback API.
npm install @codebar-ag/feedback-widgetimport { initFeedback } from '@codebar-ag/feedback-widget';
const feedback = await initFeedback({
projectKey: 'fbk_live_…',
endpoint: 'https://feedback.example.com',
locale: 'en_CH',
identity: { id: '4711', name: 'Anna Muster', email: '[email protected]' }, // optional
});
feedback.on('after_send', ({ id }) => console.log('Feedback stored', id));Without a build step:
<script src="https://unpkg.com/@codebar-ag/feedback-widget@1/dist/feedback.iife.js" crossorigin="anonymous"></script>
<script>
CodebarFeedback.init({ projectKey: 'fbk_live_…', endpoint: 'https://feedback.example.com' });
</script>All options, methods and events are documented in the repository README.
License
MIT
