{"id":19404360,"url":"https://github.com/nicolasparada/js-el","last_synced_at":"2026-04-30T19:31:57.661Z","repository":{"id":57131015,"uuid":"119172546","full_name":"nicolasparada/js-el","owner":"nicolasparada","description":"Utility to create HTML elements","archived":false,"fork":false,"pushed_at":"2023-03-23T00:54:25.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T18:21:55.361Z","etag":null,"topics":["html-element","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolasparada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-27T14:43:27.000Z","updated_at":"2023-03-23T01:03:57.000Z","dependencies_parsed_at":"2023-07-18T05:31:38.901Z","dependency_job_id":null,"html_url":"https://github.com/nicolasparada/js-el","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"3275731e7ecfbe39bbba0a0e6a3df05aa2304163"},"previous_names":["nicolasparada/el"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/nicolasparada/js-el","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasparada%2Fjs-el","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasparada%2Fjs-el/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasparada%2Fjs-el/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasparada%2Fjs-el/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolasparada","download_url":"https://codeload.github.com/nicolasparada/js-el/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasparada%2Fjs-el/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["html-element","npm-package"],"created_at":"2024-11-10T11:34:17.183Z","updated_at":"2026-04-30T19:31:57.644Z","avatar_url":"https://github.com/nicolasparada.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [`@nicolasparada/el`](https://npm.im/@nicolasparada/el)\n\nUtility to create HTML elements with ease. Inspired in `React.createElement`, but for actual DOM. It has nothing to do with rendering or diffing.\n\n## Usage\n\nLoad it from [unpkg.com](https://unpkg.com/@nicolasparada/el).\n\n```js\nimport el from 'https://unpkg.com/@nicolasparada/el'\n\nlet button\n\nconst div = el('div', { className: 'container' }, [\n    el('button', { ref: buttonRef, onclick }, 'Click me'),\n])\n\nfunction buttonRef(el) {\n    button = el\n}\n\nfunction onclick(ev) {\n    console.log('Click', ev)\n}\n\nconsole.assert(div instanceof HTMLDivElement)\nconsole.assert(div.className === 'container')\nconsole.assert(div.childNodes.length === 1)\nconsole.assert(button instanceof HTMLButtonElement)\nconsole.assert(button.onclick === onclick)\nconsole.assert(button.textContent === 'Click me')\n```\n\n```js\nfunction el(tagName, props, ...children)\n```\n\n- `tagName`: is a `string` with the tag name of the `HTMLElement` to create.\n- `props`: is a `Object` mix with properties and attributes to set. The special `ref` prop comes handy to save a reference to the element. You can attach an event listener prefixing the event name with 'on' ex: `{ onsomeevent: onSomeEvent }`.\n- `children`: is variadic; this argument will be flatten so you can pass a comma separated list of children or an array.\n\nThis function will return an instance of `HTMLElement`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasparada%2Fjs-el","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolasparada%2Fjs-el","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasparada%2Fjs-el/lists"}