@ihatecode/react-file-picker
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@ihatecode/react-file-picker

Englist | 中文

npm npm GitHub forks GitHub Repo stars

Introduction

A file picker component written in React.

Install

# npm
npm install @ihatecode/react-file-picker
# yarn
yarn add @ihatecode/react-file-picker
# pnpm
pnpm add @ihatecode/react-file-picker

Usage

import React from 'react';
import FilePicker from '@ihatecode/react-file-picker';
import '@ihatecode/react-file-picker/lib/style.css';

const App: React.FC = () => {
  return (
    <FilePicker
        multiple
        accept="image/*"
        onChange={(files) => console.log(files)}
    >
      <span>Select files</span>
    </FilePicker>
  );
};

export default App;

Demo

Online demo: https://pjzpz7.csb.app/

Edit react-splitter

Props

Property Type Optional
className string Y
style object Y
accept string Y
multiple boolean Y
directory boolean Y
draggable boolean Y
children any Y
onChange (files: FileList) => void Y

License

MIT

/@ihatecode/react-file-picker/

    Package Sidebar

    Install

    npm i @ihatecode/react-file-picker

    Weekly Downloads

    51

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    5.77 kB

    Total Files

    6

    Last publish

    Collaborators

    • zctcode