Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@felte/element

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@felte/element

An extensible form library that can be used as a custom element

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@felte/element

Tests Bundle size NPM Version NPM Downloads codecov

Felte is an extensible form library originally bult for Svelte. This package aims to provide Felte's functionality using a custom element. Felte, on its most simple form, only requires you to provide a <form> element to it in order to work.

Features

  • Single action to make your form reactive.
  • Use HTML5 native elements to create your form. (Only the name attribute is necessary).
  • Provides stores and helper functions to handle more complex use cases.
  • No assumptions on your validation strategy. Use any validation library you want or write your own strategy.
  • Handles addition and removal of form controls during runtime.
  • Official solutions for error reporting using reporter packages.
  • Well tested. Currently at 99% code coverage and constantly working on improving test quality.
  • Supports validation with yup, zod and superstruct.
  • Easily extend its functionality.

Simple usage example

Using Svelte as an example:

TODO: Add proper example

<script>
  import { prepareForm } from '@felte/element'

  prepareForm('signin', {
    onSubmit: async (values) => {
      /* call to an api */
    },
  })
</script>

<felte-form id="signin">
  <form>
    <input type=text name=email>
    <input type=password name=password>
    <input type=submit value="Sign in">
  </form>
</felte-form>

Installation

npm install --save @felte/element

# Or if you use yarn

yarn add @felte/element

Usage

To learn more about how to use felte to handle your forms, check the official documentation. TODO: Add documentation

Keywords

FAQs

Package last updated on 08 Mar 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc