https://github.com/claeusdev/simple-file-input
Simple file input component for React
https://github.com/claeusdev/simple-file-input
Last synced: 6 months ago
JSON representation
Simple file input component for React
- Host: GitHub
- URL: https://github.com/claeusdev/simple-file-input
- Owner: claeusdev
- Created: 2019-01-30T16:55:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-26T04:34:17.000Z (about 2 years ago)
- Last Synced: 2025-08-02T16:27:20.313Z (6 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple File Input
Simple file input component for React
# Usage
```js
import React from "react";
import FileInput from "react-simple-input";
const Form = () => {
const handleChange = (event) => {
console.log("Selected File", event.target.files[0]);
};
return (
);
};
export default Form;
```
This components takes a few props by default
### Props
#### name, accept, className, placeholder, onChange
the `name` props take the name of the input, for accesibility, the `accept` takes the file types you want to accept, the `onChange` takes the event you want to run on selected file.
## Todo
- Ship to npm