Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pascalallen/react-form-components
Repository for the @pascalallen/react-form-components NPM package. Simple HTML form elements for React.
https://github.com/pascalallen/react-form-components
react sass typescript
Last synced: 8 days ago
JSON representation
Repository for the @pascalallen/react-form-components NPM package. Simple HTML form elements for React.
- Host: GitHub
- URL: https://github.com/pascalallen/react-form-components
- Owner: pascalallen
- License: other
- Created: 2021-11-04T13:11:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-21T14:02:55.000Z (over 1 year ago)
- Last Synced: 2024-10-31T17:36:04.918Z (17 days ago)
- Topics: react, sass, typescript
- Language: TypeScript
- Homepage:
- Size: 562 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Form Components
Simple HTML form elements for React.
## Installation
Use the package manager [yarn](https://classic.yarnpkg.com/lang/en/docs/install) to install @pascalallen/react-form-components.
```bash
yarn add @pascalallen/react-form-components
```## Usage
```typescript jsx
import { ChangeEvent, useState } from 'react';
import '@pascalallen/react-form-components/dist/app.scss';
import { Form, InputControl } from '@pascalallen/react-form-components';const [emailAddress, setEmailAddress] = useState("");
const handleChange = (event: ChangeEvent): void => {
setEmailAddress(event.target.value);
};0}
required
error={emailAddress.length < 1 && "Email address is required"}
onChange={handleChange}
/>
;
```