Documentation

Custom providers

Extend an isolated registry without patching global state.

Define and register

Custom ids and generated URLs are validated. Duplicate built-in ids and javascript URLs are rejected.

const provider_acme = defineShareProvider({
	id: 'acme',
	label: 'Acme Social',
	category: 'social',
	icon: 'lucide:send',
	fields: ['url', 'text'],
	buildUrl: payload =>
		`https://share.acme.test/?url=${encodeURIComponent(payload.url)}`
})

const registry_share = createShareRegistry([provider_acme])

Provider safety

Custom web intents must resolve to HTTP or HTTPS. Copy and native actions are separate APIs rather than custom networks.