inploi SDK
Plugins

Job Alerts Widget

Let users subscribe to saved searches

The Job Alerts plugin renders a subscribe form that ties into job search filters.

Host element required: <div id="inploi-job-alerts" /> .

<div id="inploi-job-alerts"></div>
import { jobAlertsPlugin } from '@inploi/plugin-job-alerts';
import { initialiseSdk } from '@inploi/sdk';

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

alerts.render({
	theme: { mode: 'light', corners: 'soft', highlights: 'fill', accent: { hue: 260, chroma: 1 } },
	config: { label: 'Create alert', headerText: 'Job alerts' },
	initialFilters: {},
});

// Later, you can update filters and config
alerts.setFilters({ city: 'London' });
alerts.setConfig(prev => ({ ...prev, label: 'Save search' }));
<script defer src="https://unpkg.com/@inploi/sdk/cdn/index.js"></script>
<script defer src="https://unpkg.com/@inploi/plugin-job-alerts/cdn/index.js"></script>
<div id="inploi-job-alerts"></div>
<script>
	document.addEventListener('DOMContentLoaded', () => {
		const sdk = inploi.initialiseSdk({ publishableKey: 'pk_...', env: 'production' });
		const alerts = sdk.register(inploi.jobAlertsPlugin());
		alerts.render({
			theme: { mode: 'light', corners: 'soft', highlights: 'fill', accent: { hue: 260, chroma: 1 } },
			config: { label: 'Create alert', headerText: 'Job alerts' },
			initialFilters: {},
		});
	});
</script>

Plugin configuration

theme

Controls the visual design of the widget.

Prop

Type

config

Copies and labels for the UI.

Prop

Type

initialFilters

Map of filters to initialise the subscription form with.

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


setFilters(filters)

Updates current filters.

Prop

Type


setConfig(config | updater)

Updates UI copy.

Prop

Type