A minimal Svelte 5 demo that bridges an external DOM input into Svelte reactivity. It uses createSubscriber to keep an outside element and a component prop in sync without duplicating state.
npm installnpm run devsrc/main.js wraps an existing DOM <input> with createReactiveProps, calling createSubscriber to listen for input and change events and expose a reactive value getter/setter.src/App.svelte binds its internal input to externalInput.value, so both inputs mirror changes through Svelte's binding system.The subscriber lazily attaches listeners only while Svelte effects are tracking the getter, ensuring clean teardown when the component unmounts.
npm run dev – start the Vite dev servernpm run build – build for productionnpm run preview – preview the production buildwindow.matchMediacreateReactiveProps to surface additional DOM properties