{"id":18652764,"url":"https://github.com/meowtec/react-auto-classnames","last_synced_at":"2026-03-04T13:30:51.735Z","repository":{"id":40356014,"uuid":"412853040","full_name":"meowtec/react-auto-classnames","owner":"meowtec","description":"JSX runtime for applying `clsx()` automatically","archived":false,"fork":false,"pushed_at":"2022-09-30T12:58:39.000Z","size":118,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T14:18:29.592Z","etag":null,"topics":["classnames","react"],"latest_commit_sha":null,"homepage":"","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/meowtec.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}},"created_at":"2021-10-02T16:37:09.000Z","updated_at":"2025-02-17T19:58:53.000Z","dependencies_parsed_at":"2023-01-17T16:46:57.053Z","dependency_job_id":null,"html_url":"https://github.com/meowtec/react-auto-classnames","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meowtec/react-auto-classnames","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowtec%2Freact-auto-classnames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowtec%2Freact-auto-classnames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowtec%2Freact-auto-classnames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowtec%2Freact-auto-classnames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meowtec","download_url":"https://codeload.github.com/meowtec/react-auto-classnames/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowtec%2Freact-auto-classnames/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"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":["classnames","react"],"created_at":"2024-11-07T07:08:24.633Z","updated_at":"2026-03-04T13:30:51.718Z","avatar_url":"https://github.com/meowtec.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-auto-classnames\n\nJSX runtime for applying `clsx()` to `className` prop automatically.\n\nNOT a babel plugin.\n\n## Installation\n\n```\nnpm i react-auto-classnames\n```\n\n## Usage\n\nIf you use TypeScript, edit your `tsconfig.json` like:\n\n```js\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"react-auto-classnames\",\n  }\n}\n```\n\nIf you use `@babel/preset-react` to transform jsx:\n\n```js\n// .babelrc / babel.config.json\n{\n  \"presets\": [\n    [\n      \"@babel/preset-react\",\n      {\n        \"runtime\": \"automatic\",\n        \"importSource\": \"react-auto-classnames\"\n      }\n    ]\n  ]\n}\n\n```\n\nIf you use esbuild (take *vite* for example):\n\n```js\n{\n  esbuild: {\n    jsxFactory: 'createElement',\n    jsxFragment: 'Fragment',\n    jsxInject: 'import { createElement, Fragment } from \\'react-auto-classnames\\'',\n  },\n}\n```\n\nThen you can write React code like this:\n\n```js\nfunction App() {\n  return (\n    \u003cdiv className={['class-a', 'class-b', {\n      'class-disabled': disabled,\n    }]}\u003e\n  )\n}\n```\n\n[clsx](https://github.com/lukeed/clsx) will be used to handle the `className` prop.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowtec%2Freact-auto-classnames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeowtec%2Freact-auto-classnames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowtec%2Freact-auto-classnames/lists"}