I want to receive arbitrary props from "above" and spread them onto an <input>
, as shown here where inputProps
would become an object containing any additional props set on this component (similar to python's **kwargs
, in case you're familiar):
<script>export let id;export ...inputProps;</script><div> id: {id}<input {...inputProps} /></div>
Can you point me toward the correct Svelte mechanism for accomplishing something like this? I have a feeling that I'm asking the wrong question, but I need a svelte developer to set me straight. Should I use a slot instead? Or learn about actions / "the use directive"?