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
- Host: GitHub
- URL: https://github.com/sarfraznawaz2005/smart-button
- Owner: sarfraznawaz2005
- License: mit
- Created: 2020-02-27T10:13:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-27T12:03:11.000Z (about 5 years ago)
- Last Synced: 2025-02-15T05:16:27.255Z (2 months ago)
- Topics: html, javascript, web-components, webcomponents
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
````