inploi SDK
Plugins

Feedback Widget

Collect quick thumbs-up/down and comments from users

Add a host element, then render the widget via the plugin.

Host element required: <div data-widget="inploi-feedback" data-key="..." /> .

<div data-widget="inploi-feedback" data-key="page"></div>
import { feedbackPlugin } from '@inploi/plugin-feedback';
import { initialiseSdk } from '@inploi/sdk';

const sdk = initialiseSdk({ publishableKey: 'pk_...', env: 'sandbox' });
const feedback = sdk.register(feedbackPlugin());

feedback.render({
	key: 'page',
	size: 'sm',
	theme: {
		mode: 'light',
		corners: 'rounded',
		highlights: 'stroke',
		accent: { hue: 260, chroma: 1 },
		positive: { hue: 180, chroma: 1 },
		negative: { hue: 33, chroma: 1 },
	},
	terms: {},
});
<script defer src="https://unpkg.com/@inploi/sdk/cdn/index.js"></script>
<script defer src="https://unpkg.com/@inploi/plugin-feedback/cdn/index.js"></script>
<div data-widget="inploi-feedback" data-key="page"></div>
<script>
	document.addEventListener('DOMContentLoaded', () => {
		const sdk = inploi.initialiseSdk({ publishableKey: 'pk_...', env: 'production' });
		const feedback = sdk.register(inploi.feedbackPlugin());
		feedback.render({
			key: 'page',
			size: 'sm',
			theme: {
				mode: 'light',
				corners: 'rounded',
				highlights: 'stroke',
				accent: { hue: 260, chroma: 1 },
				positive: { hue: 180, chroma: 1 },
				negative: { hue: 33, chroma: 1 },
			},
			terms: {},
		});
	});
</script>

Plugin configuration

theme

Controls the visual design of the widget.

Prop

Type

terms

Override translations for the widget.

Prop

Type

API surface

prerender(params)

Returns { html } for SSR/pre-hydration.

Prop

Type


render(params)

Mounts or hydrates the UI in the host element.

Prop

Type