Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omidnikrah/use-file-dialog
Open file dialog without struggling with file input using useFileDialog react hook
https://github.com/omidnikrah/use-file-dialog
Last synced: about 1 month ago
JSON representation
Open file dialog without struggling with file input using useFileDialog react hook
- Host: GitHub
- URL: https://github.com/omidnikrah/use-file-dialog
- Owner: omidnikrah
- Created: 2021-03-20T14:53:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-04T06:13:22.000Z (over 3 years ago)
- Last Synced: 2024-10-03T15:19:03.548Z (2 months ago)
- Language: TypeScript
- Size: 158 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-awesome-react-hooks - `useFileDialog`
- awesome-react-hooks-cn - `useFileDialog`
- awesome-react-hooks - `useFileDialog`
- awesome-react-hooks - `useFileDialog`
README
# React `useFileDialog` hook
[![NPM](https://img.shields.io/npm/v/use-file-dialog.svg)](https://www.npmjs.com/package/use-file-dialog)Open file dialog without struggling with file input using useFileDialog react hook.
## Install
You can install `use-file-dialog` with NPM or Yarn.
```bash
npm install use-file-dialog
``````bash
yarn add use-file-dialog
```## Usage
Here's how to use `use-file-dialog`:
```jsx
import useFileDialog from "use-file-dialog";function App() {
const { files, openFileDialog } = useFileDialog();console.log(files);
return (
Choose file
);
}
```