{"id":25488528,"url":"https://github.com/kocisov/crab","last_synced_at":"2025-06-21T08:06:39.805Z","repository":{"id":57125261,"uuid":"90532563","full_name":"kocisov/crab","owner":"kocisov","description":"JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API","archived":false,"fork":false,"pushed_at":"2018-07-17T08:22:30.000Z","size":101,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-17T01:57:04.041Z","etag":null,"topics":["crab","custom-elements","dom","frontend","interface","library","minimal","react","shadow-dom","ui","view","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/kocisov.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":"2017-05-07T12:56:07.000Z","updated_at":"2023-03-08T03:47:17.000Z","dependencies_parsed_at":"2022-08-31T08:20:26.360Z","dependency_job_id":null,"html_url":"https://github.com/kocisov/crab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kocisov/crab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kocisov%2Fcrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kocisov%2Fcrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kocisov%2Fcrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kocisov%2Fcrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kocisov","download_url":"https://codeload.github.com/kocisov/crab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kocisov%2Fcrab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261088354,"owners_count":23107682,"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":["crab","custom-elements","dom","frontend","interface","library","minimal","react","shadow-dom","ui","view","webcomponents"],"created_at":"2025-02-18T20:52:44.711Z","updated_at":"2025-06-21T08:06:34.758Z","avatar_url":"https://github.com/kocisov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"\" src=\"https://kocisov.github.io/crab/crab.svg\" width=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API.\n\u003c/p\u003e\n\n[![npm](https://img.shields.io/npm/v/@kocisov/crab.svg)](http://npmjs.com/@kocisov/crab) [![Code Climate](https://codeclimate.com/github/Kocisov/crab/badges/gpa.svg)](https://codeclimate.com/github/Kocisov/crab)\n\n\u003e This version of Crab was written in TypeScript to include Types for your development\n\n### How does it look\n\n```js\nimport { Component, defineComponents, render } from '@kocisov/crab'\n\nexport default class Header extends Component {\n  // or Polymer like =\u003e static get is()\n  static get componentName() {\n    return 'header-component'\n  }\n\n  state = {\n    id: 'Some string...',\n  }\n\n  changeState() {\n    this.setState({\n      id: uuid.v4(),\n    })\n  }\n\n  render() {\n    return `\n      \u003cdiv class=\"flex-right\"\u003e\n        Hello ${this.state.id}\n      \u003c/li\u003e\n    `\n  }\n}\n\ndefineComponents([Header, SmallButon], { crabug: true })\n\nrender(\n  `\n    \u003cheader-component onClick=\"changeState\"\u003e\u003c/header-component\u003e\n  `,\n  `\n    body {\n      margin: 0;\n    }\n  `,\n  document.getElementById('root'),\n)\n```\n\n### Installation\n\nThis version of **Crab** is compiling from ES2015+ to ES5 ready even without native-shim.\n\n##### Install crab with package manager\n\n```bash\n# yarn\nyarn add @kocisov/crab\n\n# npm\nnpm install --save @kocisov/crab\n```\n\n##### Include crab into your code\n\n```js\n// webpack with babel\nimport { Component, defineComponents, render } from '@kocisov/crab'\n\n// ...\n\nrender(\n  `\n    \u003cview-layout\u003e\u003c/view-layout\u003e\n  `,\n  document.getElementById('root'),\n)\n```\n\n### Docs\n\nWork in progress at [docs](https://kocisov.gitbooks.io/crab/content/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkocisov%2Fcrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkocisov%2Fcrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkocisov%2Fcrab/lists"}