Fetching contributors…
Cannot retrieve contributors at this time
28 lines (19 sloc) 592 Bytes


Catches file and text drop and paste events.


import {DropArea} from 'libreact/lib/DropArea';

  onFiles={(files, event) => console.log(files)}
  onUri={(uri, event) => console.log(uri)}
  onText={(text, event) => console.log(text)}
  <div style={{border: '1px solid tomato'}}>
    Drop it like a bomb!


  • onFiles — called when files are dropped or pasted into the area.
  • onUri — called an URI from another tab is dropped in the area.
  • onText — called when text is paste in the area.