All Projects → github → file-attachment-element

github / file-attachment-element

Licence: MIT license
Attach files via drag and drop or file input.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to file-attachment-element

Progressive Image Element
⚡️ <progressive-image> custom element
Stars: ✭ 231 (+138.14%)
Mutual labels:  web-components, custom-elements
modulor-html
Missing template engine for Web Components
Stars: ✭ 36 (-62.89%)
Mutual labels:  web-components, custom-elements
Ajax Form
HTML forms on performance-enhancing drugs
Stars: ✭ 232 (+139.18%)
Mutual labels:  web-components, custom-elements
symbiote.js
Simple, light and very powerful library to create embedded components for any purpose, with a data flow management included.
Stars: ✭ 40 (-58.76%)
Mutual labels:  web-components, custom-elements
remote-input-element
An input element that sends its value to a server endpoint and renders the response body.
Stars: ✭ 72 (-25.77%)
Mutual labels:  web-components, custom-elements
Auto Complete Element
Auto-complete input values from server search results.
Stars: ✭ 213 (+119.59%)
Mutual labels:  web-components, custom-elements
web-components
A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
Stars: ✭ 322 (+231.96%)
Mutual labels:  web-components, custom-elements
Shadow Dom In Depth
Everything you need to know about Shadow DOM
Stars: ✭ 191 (+96.91%)
Mutual labels:  web-components, custom-elements
page-title
A Polymer element for easily updating a webpage's title, such as in a SPA.
Stars: ✭ 13 (-86.6%)
Mutual labels:  web-components, custom-elements
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (-69.07%)
Mutual labels:  web-components, custom-elements
Preact Custom Element
Wrap your component up as a custom element
Stars: ✭ 212 (+118.56%)
Mutual labels:  web-components, custom-elements
grid-container
A grid for the future, CSS Grid Layout + Web Components (Custom Elements v1 + Shadow DOM v1)
Stars: ✭ 51 (-47.42%)
Mutual labels:  web-components, custom-elements
Server Components
🔧 A simple, lightweight tool for composable HTML rendering in Node.js, based on web components.
Stars: ✭ 212 (+118.56%)
Mutual labels:  web-components, custom-elements
Elements
Lazy load Angular Elements (or any other web components / custom elements ) with ease!
Stars: ✭ 223 (+129.9%)
Mutual labels:  web-components, custom-elements
Clipboard Copy Element
Copy element text content or input values to the clipboard.
Stars: ✭ 198 (+104.12%)
Mutual labels:  web-components, custom-elements
Tab Container Element
An accessible tab container element with keyboard support.
Stars: ✭ 238 (+145.36%)
Mutual labels:  web-components, custom-elements
Time Elements
Web component extensions to the standard <time> element.
Stars: ✭ 2,318 (+2289.69%)
Mutual labels:  web-components, custom-elements
Custom Elements
All about HTML Custom Elements
Stars: ✭ 188 (+93.81%)
Mutual labels:  web-components, custom-elements
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+81.44%)
Mutual labels:  web-components, custom-elements
esl
Lightweight and flexible UI component library based on web components technology for creating basic UX modules
Stars: ✭ 53 (-45.36%)
Mutual labels:  web-components, custom-elements

<file-attachment> element

Attach files via drag and drop or file input.

Installation

$ npm install @github/file-attachment-element

Usage

import '@github/file-attachment-element'
<file-attachment directory>
  <input type="file" multiple />
</file-attachment>

Optional attributes

  • file-attachment[directory] enables traversing directories.
  • file-attachment[input] points to the ID of a file input inside of <file-attachment>. If supplied, only files selected from the corresponding <input> will be attached to <file-attachment>.

Styling drag state

A boolean [hover] attribute is present on <file-attachment> while files are dragged over the element.

file-attachment[hover] { border: 2px dashed grey; }

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 require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].