# select-files

> Virtually creates a file input element (), triggers it and returns selected files.

Latest version **1.0.1** (published 2020-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install select-files
pnpm add select-files
yarn add select-files
bun add select-files
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-05-07 |
| First published | 2019-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Vitor Luiz Cavalcanti |
| Maintainers | vitorluizc |
| Keywords | select-files, select-file, upload-files, upload-file, select, upload, input-file, file-input, file, filelist, dom, typescript, javascript |

## Links

- npm: https://www.npmjs.com/package/select-files
- Repository: https://github.com/VitorLuizC/select-files
- Homepage: https://github.com/VitorLuizC/select-files#readme
- Issues: https://github.com/VitorLuizC/select-files/issues
- npm.io page: https://npm.io/package/select-files

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-05-07
- 1.0.0 — 2019-09-09

## README

# selectFiles

[![Build Status](https://travis-ci.org/VitorLuizC/select-files.svg?branch=master)](https://travis-ci.org/VitorLuizC/select-files)
[![License](https://badgen.net/github/license/VitorLuizC/select-files)](./LICENSE)
[![Library minified size](https://badgen.net/bundlephobia/min/select-files)](https://bundlephobia.com/result?p=select-files)
[![Library minified + gzipped size](https://badgen.net/bundlephobia/minzip/select-files)](https://bundlephobia.com/result?p=select-files)

Virtually creates a file input element (`<input type="file" />`), triggers it and returns selected files.

```js
import selectFiles from 'select-files';

selectFiles({ accept: 'image/*', capture: 'camera' }).then(files => {
  // ...
});
```

## Installation

This library is published in the NPM registry and can be installed using any compatible package manager.

```sh
npm install select-files --save

# For Yarn, use the command below.
yarn add select-files
```

### Installation from CDN

This module has an UMD bundle available through JSDelivr and Unpkg CDNs.

```html
<!-- For UNPKG use the code below. -->
<script src="https://unpkg.com/select-files"></script>

<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/npm/select-files"></script>

<script>
  // UMD module is exposed through the "selectFiles" global function.
  selectFiles({ multiple: true }).then(files => {
    console.log(files);
  });
</script>
```

## Documentation

[Documentation generated from source files by Typedoc](./docs/README.md).

## License

Released under [MIT License](./LICENSE).

---
_Source: https://npm.io/package/select-files · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
