Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jolle/tini
🐀 Tini is a very tiny element creation helper
https://github.com/jolle/tini
Last synced: about 1 month ago
JSON representation
🐀 Tini is a very tiny element creation helper
- Host: GitHub
- URL: https://github.com/jolle/tini
- Owner: jolle
- License: mit
- Created: 2018-06-24T11:37:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T09:10:14.000Z (over 6 years ago)
- Last Synced: 2023-11-09T13:14:30.110Z (about 1 year ago)
- Language: JavaScript
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tini
A very tiny (~0.5kb) element creation helper. Supports styles, attributes, event listeners, text node creation, classes, IDs and children.
```js
import { mk } from 'tini';document.body.appendChild(
mk(
'{color=red}[data-cool=yes].nice#hello',
"I'm a cool div",
mk('strong.extraCool', 'with a super cool strong tag!'),
function onclick() {
console.log('and I can listen for events too!');
},
mk('input[disabled=disabled]')
)
);
```