An open API service indexing awesome lists of open source software.

https://github.com/sarfraznawaz2005/smart-button

Smart Button Web Component
https://github.com/sarfraznawaz2005/smart-button

html javascript web-components webcomponents

Last synced: 17 days ago
JSON representation

Smart Button Web Component

Awesome Lists containing this project

README

        

# Smart-Button Web Component

A button of type `submit` that when clicked does these things automatically:

- Disables itself (to avoid duplicate form submissions)
- Changes text to `Wait...` by default
- Enables back and restores original button text after given time

## Usage

````html

Submit

````

## Attributes

- `timeout`: Time button will be enabled back and restore original text. Default `5000`
- `text`: Label of button that will be applied when button is clicked. Default `Wait...`

**Example**

````html
Update
````