Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@github/remote-input-element

Package Overview
Dependencies
0
Maintainers
14
Versions
14
Issues
File Explorer

Advanced tools

@github/remote-input-element

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

    0.3.1latest

Version published
Maintainers
14
Yearly downloads
8,942
increased by61.03%

Weekly downloads

Changelog

Source

  • fix: output umd build for main key #19

https://github.com/github/remote-input-element/compare/v0.3.0...v0.3.1

Readme

Source

<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.

FAQs

What is @github&#x2F;remote-input-element?

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

Is @github&#x2F;remote-input-element popular?

The npm package @github&#x2F;remote-input-element receives a total of 88 weekly downloads. As such, @github&#x2F;remote-input-element popularity was classified as not popular.

Is @github&#x2F;remote-input-element well maintained?

We found that @github&#x2F;remote-input-element demonstrated a not healthy version release cadence and project activity. It has 14 open source maintainers collaborating on the project.

Last updated on 19 Mar 2020
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc