1.0.2 • Published 9 months ago

@ihatecode/react-file-picker v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@ihatecode/react-file-picker

Englist | 中文

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

PropertyTypeOptional
classNamestringY
styleobjectY
acceptstringY
multiplebooleanY
directorybooleanY
draggablebooleanY
childrenanyY
onChange(files: FileList) => voidY

License

MIT

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

10 months ago