{"id":16398843,"url":"https://github.com/sauldoescode/rilti-dom","last_synced_at":"2026-06-10T23:31:45.956Z","repository":{"id":71027873,"uuid":"121955408","full_name":"SaulDoesCode/rilti-dom","owner":"SaulDoesCode","description":"it's basically html tags as functions but with superpowers!","archived":false,"fork":false,"pushed_at":"2018-02-18T17:28:04.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T09:43:29.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaulDoesCode.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-18T13:41:37.000Z","updated_at":"2018-02-28T05:18:21.000Z","dependencies_parsed_at":"2023-06-08T12:15:57.707Z","dependency_job_id":null,"html_url":"https://github.com/SaulDoesCode/rilti-dom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SaulDoesCode/rilti-dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Frilti-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Frilti-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Frilti-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Frilti-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaulDoesCode","download_url":"https://codeload.github.com/SaulDoesCode/rilti-dom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Frilti-dom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34175887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T05:14:03.011Z","updated_at":"2026-06-10T23:31:45.941Z","avatar_url":"https://github.com/SaulDoesCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💫 rilti-dom 💫\n## write your dom with functions  \n\n**it's [rilti.js](https://github.com/SaulDoesCode/rilti.js) but only the dom parts**\n\nrilti-dom weighs in at only ~2.5KB gzipped and ~5.1KB just minified.\n\nBasically rilti-dom is html tags as functions but with superpowers.     \n\nBut Wait that's not all folks, there's more!     \nWe also have a routing system similar to ``RE:DOM's``,\nnot to mention that the ``rilti`` object includes\nnifty functions like ``.curry, .extend, .each, .flatten, .runAsync`` as well as features\nlike ``.on/once(target, event_type, e =\u003e {}, =options_from_addEventListener)``      \nor\n```js\nrilti.on/once.anyEventImaginable(target, (event, target) =\u003e {}, =options)\n```\n\nAnd don't get me started on ``.isX(x) -\u003e bool`` type functions which include\n``.isDef, isArr, isArrlike, isStr, isBool, isObj, isNum, isNil, isNode, isInput, isPrimitive, isRenderable``\n\nOoh and one last thing... `rilti.domfn.mutate`\nBut can your framework do this?\n```js\nconst {dom, domfn: {mutate}} = rilti\n\n// async/await because .onload or 'DOMContentLoaded' is old school\n(async () =\u003e {\n  const cardElement = await dom('div.card')\n\n  mutate(cardElement, {\n    class: {\n      disabled: false,\n      'material-shadow': true\n    },\n    attr: {\n      'data-card-type': 'modal'\n    },\n    css: {\n      '--highlight-color': 'crimson',\n      // ^_ css variables? uh-huh totally.\n      cursor: 'not-allowed' // can't touch this! da na-na-na\n    },\n    once: {\n      destroy (e) {\n        console.log('card is no more :(')\n      }\n    },\n    ondblclick: e =\u003e console.log('Why you touch me like this?')\n  })\n})()\n```\n\n## example\n\n```js\nconst {dom: {h1}, render} = rilti\n\nconst hello = h1('rilti-dom greets the world!')\n\nrender(hello) // -\u003e to \u003cbody\u003e\n```\n\nOR\n\n```js\nrilti.dom.h1(\n  {render: 'body'},\n  'rilti-dom greets the world!'\n)\n```\n\n#### Site Navigation\n\n```js\nconst {\n  dom: {a, p, nav, header, h1, main, div, html},\n  router\n} = rilti\n\nconst navbar = header({\n  render: 'body',\n  class: 'navbar'\n},\n  h1('My Awesome Site!'),\n  nav(\n    a({href: '#home'}, 'home'),\n    a({href: '#about'}, 'about'),\n    a({href: '#contact'}, 'contact'),\n    a({\n      href: 'https://github.com/SaulDoesCode',\n      attr: {target: '_blank'}\n    },\n      'my github'\n    )\n  )\n)\n\nconst pageView = main({\n  class: 'page-view'\n})\n\nrouter({\n  home: {\n    host: pageView,\n    view: div(\n      h1('Welcome to my Awsome site!'),\n      p(`You're reading the \"home page\" of sorts.`)\n    )\n  },\n// \"#\" is optional\n  '#about': {\n    host: pageView,\n//  ^- add the view to \u003cmain class=\"page-view\"\u003e when the route matches\n    view: [\n      () =\u003e 'arrays, primitives render nodes, elements, functions...',\n      p('All of ^- these rilti-dom will render with ease'),\n      html(`\n        No really,\n        \u003cb\u003eAnything goes!\u003c/b\u003e\n      `)\n    ]\n  },\n  contact: {\n    host: pageView,\n    view: `\n      you can talk to me at saul@grimstack.io\n      or if you have any issues or concerns\n      put them up on github.com/SaulDoesCode.\n    `\n  }\n})\n\nif (!location.hash) location.hash = '#home'\n```\n\nLICENSE = MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauldoescode%2Frilti-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsauldoescode%2Frilti-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauldoescode%2Frilti-dom/lists"}