All Projects → github → remote-input-element

github / remote-input-element

Licence: MIT license
An input element that sends its value to a server endpoint and renders the response body.

Programming Languages

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

Projects that are alternatives of or similar to remote-input-element

Clipboard Copy Element
Copy element text content or input values to the clipboard.
Stars: ✭ 198 (+175%)
Mutual labels:  web-components, custom-elements
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+144.44%)
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 (+194.44%)
Mutual labels:  web-components, custom-elements
Time Elements
Web component extensions to the standard <time> element.
Stars: ✭ 2,318 (+3119.44%)
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 (-81.94%)
Mutual labels:  web-components, custom-elements
Custom Elements
All about HTML Custom Elements
Stars: ✭ 188 (+161.11%)
Mutual labels:  web-components, custom-elements
Auto Complete Element
Auto-complete input values from server search results.
Stars: ✭ 213 (+195.83%)
Mutual labels:  web-components, custom-elements
Omi
Front End Cross-Frameworks Framework - 前端跨框架跨平台框架
Stars: ✭ 12,153 (+16779.17%)
Mutual labels:  web-components, custom-elements
Ajax Form
HTML forms on performance-enhancing drugs
Stars: ✭ 232 (+222.22%)
Mutual labels:  web-components, custom-elements
Progressive Image Element
⚡️ <progressive-image> custom element
Stars: ✭ 231 (+220.83%)
Mutual labels:  web-components, custom-elements
Bolt
The Bolt Design System provides robust Twig and Web Component-powered UI components, reusable visual styles, and powerful tooling to help developers, designers, and content authors build, maintain, and scale best of class digital experiences.
Stars: ✭ 186 (+158.33%)
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 (+347.22%)
Mutual labels:  web-components, custom-elements
Swiss
🇨🇭Functional custom elements
Stars: ✭ 169 (+134.72%)
Mutual labels:  web-components, custom-elements
Shadow Dom In Depth
Everything you need to know about Shadow DOM
Stars: ✭ 191 (+165.28%)
Mutual labels:  web-components, custom-elements
Markdown Toolbar Element
Markdown formatting buttons for text inputs.
Stars: ✭ 160 (+122.22%)
Mutual labels:  web-components, custom-elements
Preact Custom Element
Wrap your component up as a custom element
Stars: ✭ 212 (+194.44%)
Mutual labels:  web-components, custom-elements
Html Include Element
Easily include external HTML into your pages.
Stars: ✭ 143 (+98.61%)
Mutual labels:  web-components, custom-elements
Ion Phaser
A web component to use Phaser Framework with Angular, React, Vue, etc 🎮
Stars: ✭ 152 (+111.11%)
Mutual labels:  web-components, custom-elements
Elements
Lazy load Angular Elements (or any other web components / custom elements ) with ease!
Stars: ✭ 223 (+209.72%)
Mutual labels:  web-components, custom-elements
Tab Container Element
An accessible tab container element with keyboard support.
Stars: ✭ 238 (+230.56%)
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.

Installation

$ npm install @github/remote-input-element

Usage

import '@github/remote-input-element'
<!-- Filter a list of items from the server -->
<remote-input src="/query" aria-owns="results">
  <input>
</remote-input>
<ul id="results"></ul>

A GET request will be sent to /query?q=${input.value}.

The parameter name (q) is customizable with the [param] attribute:

<!-- Live preview of Markdown -->
<remote-input src="/preview" aria-owns="md-preview" param="body">
  <textarea></textarea>
</remote-input>
<div id="md-preview"></div>

Styling loading state

A boolean [loading] attribute is added to <remote-input> when a network request begins and removed when it ends.

.loading-icon { display: none; }
remote-input[loading] .loading-icon { display: inline; }

Events

  • loadstart - The server fetch has started.
  • load - The network request completed successfully.
  • error - The network request failed.
  • loadend - The network request has completed.
  • remote-input-success – Received a successful response (status code 200-299), and response HTML has been set. Bubbles.
  • remote-input-error – Received a not successful response. 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].