react-form-page-transition
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

react-form-page-transition

react-form-page-transition is a React component that enables to make easy <form /> page transitions

license npm latest package npm downloads

Installation

If you're using npm, in the command prompt run:

npm install react-form-page-transition --save

If you're using yarn, run:

yarn add react-form-page-transition

Usage

To use the component, first import FormPageTransition into your file:

import FormPageTransition from "react-form-page-transition";

Then, place the <FormPageTransition> in the component you want to make the page transition with forms.

A sample file might look like this:

import React from "react";
import FormPageTransition from "react-form-page-transition";

const App = () => (
  <FormPageTransition
    redirectUrl="redirectUrl"
    requestMethod="GET"
    requestBody={{ hello: "hola", world: "mundo" }}
  />
);

export default App;

Props

Name Type Default Description
redirectUrl string "" The action attribute value of the form
requestMethod "GET" | "POST" "GET" The method attribute value of the form
requestBody object {} The values of the form

Package Sidebar

Install

npm i react-form-page-transition

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

7.37 kB

Total Files

9

Last publish

Collaborators

  • yukinoda