Socket
Socket
Sign inDemoInstall

svelte-formit

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svelte-formit

![enter image description here](https://img.shields.io/npm/dw/svelte-formit) ![enter image description here](https://img.shields.io/bundlephobia/minzip/svelte-formit)


Version published
Maintainers
1
Created

Readme

Source

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

Keywords

FAQs

Last updated on 15 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc