@svelte-parts/form-builder
v0.0.23
Published
UI to create forms
Readme
@svelte-parts/form-builder
UI to create form descriptions for @svelte-parts/form.
Try it out in the svelte REPL
Install
npm install @svelte-parts/form-builderUsage
<script>
import FormBuilder from '@svelte-parts/form-builder'
</script>
<FormBuilder
onChange={d => console.log('CHANGED', d)}
onSubmit={d => console.log('SUBMITTED', d)}
ignoreFields={['password', 'color']}
/>Properties
onChangea function taking an array ofFieldstriggered on every changeonSubmita function taking an array ofFieldstriggered when the user clicks on "Create form" (the button is only shown if this function is defined)ignoreFieldsfields that should not be proposed to the user. Depending on the context, you may not want to encourage creating a password field, for example.
