1.0.4 • Published 4 years ago

svelte-formit v1.0.4

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

svelte-formit

enter image description here enter image description here

svelte-formit is a small unopinionated library for handling forms with svelte. svelte-formit is heavily inspired by the react-hook-form library

Installation

npm install svelte-formit
yarn install svelte-formit

Getting Started

    <script>
        import { useForm } from "svelte-formit";
        const { handleSubmit, register } = useForm();

        const onSubmit = data => {
            console.log(data);
        };
    </script>

    <form on:submit={e => handleSubmit(e, onSubmit)}>
        <input use:register name="name" />
        <input use:register type="number" name="age" />
        <button type="submit">Submit</button>
    </form>

Docs

The docs are available here

1.0.4

4 years ago

1.0.3

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.7

4 years ago

0.1.4

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago