ninti
TypeScript icon, indicating that this package has built-in type declarations

0.2.10Β β€’Β PublicΒ β€’Β Published

NINTI πŸš€

Tiny lib to help work with forms on React

Installation

Just add ninti to your project:

yarn add ninti

Basics

Ninti exposes two default form elements: <Form /> and <Input />.

import React from "react";
import { Form, Input } from "ninti";

function App() {
  function handleSubmit(data) {
    console.log(data);

    /**
     * {
     *   email: 'email@example.com',
     *   password: '123456'
     * }
     */
  }

  return (
    <Form onSubmit={handleSubmit}>
      <Input name="email" />
      <Input name="password" type="password" />

      <button type="submit">Sign in</button>
    </Form>
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i ninti

Weekly Downloads

0

Version

0.2.10

License

none

Unpacked Size

79.2 kB

Total Files

6

Last publish

Collaborators

  • wolfzer44