Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metadream/thyme
Web UI components based on native javascript
https://github.com/metadream/thyme
javascript-library ui-components web-components
Last synced: 4 days ago
JSON representation
Web UI components based on native javascript
- Host: GitHub
- URL: https://github.com/metadream/thyme
- Owner: metadream
- License: mit
- Created: 2023-11-06T10:02:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T13:10:40.000Z (about 1 month ago)
- Last Synced: 2024-12-06T14:27:57.916Z (about 1 month ago)
- Topics: javascript-library, ui-components, web-components
- Language: JavaScript
- Homepage: https://metadream.github.io/thyme
- Size: 466 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Thyme UI Components
Demo: https://metadream.github.io/thyme
## Usage
```
```
If you want to use the formulas, you also need to import
```
```
## Components
```
E=mc^2
SubmitFootball
Basketball
iPhone
SamsangThis is remark content.
This is a dialog!
1
2
3
4
5
6
7
8
9
10```
## Modules
### WebSocket
```
const channel = new Thyme.Channel('ws://endpoint');
channel.on('message', (data) => console.log(data));
```### Form
```
const object = Thyme.form.getJsonObject('selector');
const array = Thyme.form.getJsonArray('selector>children');
```### Http
```
# get, post, put, patch, delete
Thyme.http.post('/path', data).then(res => {
console.log(res);
})
```### Utils
```
Thyme.alert('Alert!');
Thyme.confirm('Confirm?', () => console.log('callback'));
Thyme.info('message');
Thyme.success('message');
Thyme.warn('message');
Thyme.error('message');Thyme.util.nanoId(24);
');
Thyme.util.createElement('
Thyme.util.formatDate(new Date(), 'yyyy-MM-dd hh:mm');
Thyme.util.formatDecimal(10.3212123, 2);
Thyme.util.formatBytes(28932892);
Thyme.util.parseDuration('3:20');
Thyme.util.formatSeconds(280);
Thyme.util.stringify({a:1, b:2});
Thyme.util.base64Encode('plain text');
Thyme.util.svg2png(svgElement);
Thyme.util.toDataURI(svgHTML);
```