{"id":21260734,"url":"https://github.com/erf/elite","last_synced_at":"2026-01-01T23:44:55.345Z","repository":{"id":63144776,"uuid":"305821664","full_name":"erf/elite","owner":"erf","description":"build HTML declaratively using JS 548 bytes","archived":false,"fork":false,"pushed_at":"2022-12-20T12:04:36.000Z","size":68,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T02:50:30.642Z","etag":null,"topics":["dom","dom-api","dom-manipulation","js-dom","js-library"],"latest_commit_sha":null,"homepage":"https://erf.github.io/elite","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-20T20:08:10.000Z","updated_at":"2024-12-21T08:49:34.000Z","dependencies_parsed_at":"2023-01-30T00:25:13.629Z","dependency_job_id":null,"html_url":"https://github.com/erf/elite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/elite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695537,"owners_count":20332626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","dom-api","dom-manipulation","js-dom","js-library"],"created_at":"2024-11-21T04:20:28.816Z","updated_at":"2026-01-01T23:44:55.302Z","avatar_url":"https://github.com/erf.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elite\n\nA tiny JavaScript library for building HTML declaratively.\n\n# API\n\n`el(tag, text, attributes, events, children)`\n\n\u003e Creates an HTML element. Arguments after **tag** can be omitted and replaced with **children**. You can also omit `text` and pass the next arguments. Elements can be nested using children. \n\n`get(id)`\n\n\u003e Get element by **id**\n\n`set(element|id, child)`\n\n\u003e Given an **element** or **id**, replace children with a given **child** element(s)\n\n`add(elemnt|id, child)`\n\n\u003e Given an **element** or **id**, append a **child** element(s)\n\n*Please read the code to understand more, it's quite simple!*\n\n## EXAMPLE\n\n```Javascript\nconst app = el('div', [\n    el('h1', 'elite', { class: 'elite' }),\n    el('p', 'a tiny declarative js dom lib', { style: \"background: #ffe088; padding: 8pt;\" }),\n    el('div', [\n        el('button', 'YO', {}, { click: (e) =\u003e alert('YO !') }),\n    ]),\n    el('p', 'Made with ❤ by @apptakk'),\n])\n\nset('app', app)\n\n```\n\nResult HTML:\n\n```HTML\n\u003cmain id=\"app\"\u003e\n    \u003cdiv\u003e\n        \u003ch1 class=\"elite\"\u003eelite\u003c/h1\u003e\n        \u003cp\u003ea tiny declarative js dom lib\u003c/p\u003e\n        \u003cdiv\u003e\n            \u003cbutton\u003eYO\u003c/button\u003e\n        \u003c/div\u003e\n        \u003cp\u003eMade with ❤ by @apptakk\u003c/p\u003e\n    \u003c/div\u003e\n\u003c/main\u003e\n```\n\n[example.html](example.html)\n\n[TODO.html](TODO.html)\n\n[https://erf.github.io/elite](https://erf.github.io/elite)\n\n\nPS !\nI've built a slightly more descriptive, but less compact, version of this library called [elite-plus](https://github.com/erf/elite-plus)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Felite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Felite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Felite/lists"}