{"repo":"github/file-attachment-element","free":true,"listed":false,"github":"https://github.com/github/file-attachment-element","clone":"git clone https://github.com/github/file-attachment-element.git","description":"Attach files via drag and drop or file input.","language":"TypeScript","stars":134,"topics":["web-components","custom-elements","keep"],"license":"MIT","category":"ui-components","readme_excerpt":"&lt;file-attachment&gt; element Attach files via drag and drop or file input. Installation Usage Optional attributes - file-attachment[directory] enables traversing directories. - file-attachment[input] points to the ID of a file input inside of . If supplied, only files selected from the corresponding will be attached to . Styling drag state A boolean [hover] attribute is present on while files are dragged over the element. Events - file-attachment-accept – Files were dropped onto the element. Call event.preventDefault() to prevent the drop. Bubbles. - file-attachment-accepted – Files were added to the attachment list and can be uploaded by the host app. Bubbles. Browser support Browsers without native [custom element support][support] require a [polyfill][]. - Chrome - Firefox - Safari - Microsoft Edge [support]: https://caniuse.com/#feat=custom-elementsv1 [polyfill]: https://github.com/webcomponents/custom-elements Development License Distributed under the MIT license. See LICENSE for details.","default_branch":null,"files":null,"tree":[],"storefront":"/r/github","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/github/file-attachment-element/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}