{"id":23843611,"url":"https://github.com/yakisova41/easy-md3-react","last_synced_at":"2026-04-14T15:31:36.249Z","repository":{"id":269180090,"uuid":"906652992","full_name":"yakisova41/easy-md3-react","owner":"yakisova41","description":"This is just a wrpper of @material/web that can be used in React","archived":false,"fork":false,"pushed_at":"2024-12-22T13:41:17.000Z","size":415,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T06:12:31.853Z","etag":null,"topics":["material-3","material-ui","material-you","react","typescript","web"],"latest_commit_sha":null,"homepage":"https://yakisova41.github.io/easy-md3-react/","language":"TypeScript","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/yakisova41.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-21T14:11:17.000Z","updated_at":"2024-12-22T13:41:20.000Z","dependencies_parsed_at":"2024-12-21T15:24:30.559Z","dependency_job_id":"3b6d6d7c-9caa-4c1a-b2bf-4587bb633093","html_url":"https://github.com/yakisova41/easy-md3-react","commit_stats":null,"previous_names":["yakisova41/easy-mv3-react"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yakisova41/easy-md3-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakisova41%2Feasy-md3-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakisova41%2Feasy-md3-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakisova41%2Feasy-md3-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakisova41%2Feasy-md3-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yakisova41","download_url":"https://codeload.github.com/yakisova41/easy-md3-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakisova41%2Feasy-md3-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"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":["material-3","material-ui","material-you","react","typescript","web"],"created_at":"2025-01-02T19:50:16.120Z","updated_at":"2026-04-14T15:31:36.213Z","avatar_url":"https://github.com/yakisova41.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy Md3 React\n\nThis is just a wrpper of [@material/web](https://github.com/material-components/material-web/) that can be used in React easily.\nSo, It is complianted official design policy of Material 3 completely.\n\n- [Docs of @material/web](https://material-web.dev/)\n- [Sample page](https://yakisova41.github.io/easy-md3-react/)\n\n## Get started\n\n```sh\nnpm install https://github.com/yakisova41/easy-md3-react\n```\n\n```tsx\nimport { MdFilledButton } from \"easy-md3-react\";\n\nfunction App() {\n  return \u003cMdFilledButton\u003eHello button!\u003c/MdFilledButton\u003e;\n}\n\nexport default App;\n```\n\n## How it works??\n\nWhat this module does is create a web-component element using the React function createElement. That is simply it.\n\neasy-md3-react/tools.ts (40)\n\n```ts\n/**\n * Get a ReactElement without react from a module that is a Lit element. (Doesn't use state and useEffect)\n * @param module\n * @returns\n */\nexport function litToReact\u003c\n  T,\n  U extends\n    | keyof JSX.IntrinsicElements\n    | React.JSXElementConstructor\u003cany\u003e = React.JSXElementConstructor\u003cT\u003e\n\u003e(module: MaterialWebLitElement) {\n  let tagName = \"default-custom-element\";\n\n  module.addInitializer((initilizer) =\u003e {\n    tagName = initilizer.tagName;\n  });\n\n  // Initilize instance deliberatly to get tagname.\n  new module();\n\n  return (props: ComponentProps\u003cU\u003e \u0026 T) =\u003e {\n    if (typeof props.className === \"string\") {\n      const elementProps = {\n        ...props,\n        class: props[\"className\"],\n      };\n      delete elementProps.className;\n      return createElement\u003cU\u003e(tagName, elementProps);\n    } else {\n      return createElement\u003cU\u003e(tagName, props);\n    }\n  };\n}\n```\n\n## How to theming?\n\nYou can theme by use Theming component.\n\nIt's just setting style to body element by using theme.\n\n```tsx\nimport { Theming, MaterialTheme } from \"easy-md3-react\";\nimport themeJson from \"./theme.json\";\n\n// It's typed as MaterialTheme.\n// so you can write object directly if you don't want to import json.\nconst theme: MaterialTheme = themeJson;\n\n\u003cTheming theme={theme} scheme=\"dark\"\u003e\n  \u003cApp /\u003e\n\u003c/Theming\u003e;\n```\n\n### Supported schemes\n\n- light\n- light-medium-contrast\n- light-high-contrast\n- dark\n- dark-medium-contrast\n- dark-high-contrast\n\n### How to create theme json?\n\nCreate a theme [here](https://material-foundation.github.io/material-theme-builder/),\nthen do export \"Material Theme(JSON)\".\n\n## LICENSE\n\nCopyright (c) 2024 Yakisova41\nReleased under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakisova41%2Feasy-md3-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakisova41%2Feasy-md3-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakisova41%2Feasy-md3-react/lists"}