{"id":21260733,"url":"https://github.com/erf/elite-plus","last_synced_at":"2026-02-06T00:31:42.209Z","repository":{"id":69768411,"uuid":"567406777","full_name":"erf/elite-plus","owner":"erf","description":"build HTML declaratively using JS 559 bytes","archived":false,"fork":false,"pushed_at":"2022-11-25T01:01:40.000Z","size":67,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-02T18:05:01.388Z","etag":null,"topics":["dom","dom-api","dom-manipulation","js-dom","js-library"],"latest_commit_sha":null,"homepage":"https://erf.github.io/elite-plus","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-17T18:13:26.000Z","updated_at":"2024-01-11T16:33:40.000Z","dependencies_parsed_at":"2023-07-13T13:01:21.629Z","dependency_job_id":null,"html_url":"https://github.com/erf/elite-plus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erf/elite-plus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/elite-plus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Felite-plus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29140125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T23:14:48.546Z","status":"ssl_error","status_checked_at":"2026-02-05T23:14:35.724Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:27.395Z","updated_at":"2026-02-06T00:31:42.189Z","avatar_url":"https://github.com/erf.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elite-plus\n\nA tiny JavaScript library for building HTML declaratively.\n\nThis is a more descriptive version of [elite](https://github.com/erf/elite) which allows you to create elements using named arguments.\n\nGiven a Javascript Object or Array describing elements with a tag name (**n**), text (**t**), attributes (**a**), events (**e**) and children (**c**), the `el` function builds and returns a set of HTML elements.\n\n## Object model\n\nThe object model is defined as folows:\n\n```Javascript\nconst obj = {\n    n: 'p', // tag name\n    t: 'Hello', // text\n    a: { class: 'awesome', style: 'background: #F00' }, // attributes\n    e: { click: (e) =\u003e alert('YO') }, // events\n    c: [ // children\n        { n: 'p', t: 'hello' },\n        { n: 'p', t: 'yo' },\n    ]\n}\n```\n\n## API\n\n`el(object|array)`\n\n\u003e Create an HTML element(s) given an object or array of objects as described in [Object model](#object-model)\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 it's children with a given **child(s)** element\n\n`add(elemnt|id, child)`\n\n\u003e Given an **element** or **id** append a **child(s)** element\n\n*Please read the code to understand more, it's quite simple!*\n\n## EXAMPLE\n\n```Javascript\n    const app = el([\n        { n: 'h1', t: data.title, a: { class: 'elite' } },\n        { n: 'p', t: data.description, a: { style: \"background: #ffe088; padding: 8pt;\" } },\n        { n: 'button', t: 'Press', a: { class: 'btn' }, e: { click: (e) =\u003e alert('YO') } },\n        { n: 'p', t: 'Made with ❤ by @apptakk' },\n    ])\n    set('app', app)\n\n```\n\nResult HTML:\n\n```HTML\n\u003cmain id=\"app\"\u003e\n    \u003ch1\u003eelite\u003c/h1\u003e\n    \u003cp style=\"background: #ffe088; padding: 8pt;\"\u003ea tiny declarative js dom lib\u003c/p\u003e\n    \u003cbutton class=\"btn\"\u003ePress\u003c/button\u003e\n    \u003cp\u003eMade with ❤ by @apptakk\u003c/p\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Felite-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Felite-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Felite-plus/lists"}