{"id":17982218,"url":"https://github.com/idered/twix","last_synced_at":"2025-03-25T19:30:55.108Z","repository":{"id":63049870,"uuid":"564900530","full_name":"Idered/twix","owner":"Idered","description":"Style React components with TailwindCSS","archived":false,"fork":false,"pushed_at":"2022-11-18T18:04:30.000Z","size":1086,"stargazers_count":95,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T00:01:59.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Idered.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-11-11T19:15:11.000Z","updated_at":"2024-01-27T17:59:08.000Z","dependencies_parsed_at":"2022-11-11T21:06:54.695Z","dependency_job_id":null,"html_url":"https://github.com/Idered/twix","commit_stats":null,"previous_names":["idered/tailwindcss-radix-ui"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2Ftwix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2Ftwix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2Ftwix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2Ftwix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Idered","download_url":"https://codeload.github.com/Idered/twix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245530064,"owners_count":20630492,"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":[],"created_at":"2024-10-29T18:13:29.360Z","updated_at":"2025-03-25T19:30:54.611Z","avatar_url":"https://github.com/Idered.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twix\n\n![](./screenshot.png)\n\n\u003cp align=\"center\"\u003e\nStyle React components with TailwindCSS\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://codesandbox.io/s/tailwindcss-radix-ui-jnfckh?fontsize=14\u0026hidenavigation=1\u0026theme=dark\"\u003e\n    \u003cimg alt=\"Edit tailwindcss-radix-ui\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/intent/follow/?screen_name=Idered\"\u003e\n    \u003cimg alt=\"twitter\" src=\"https://img.shields.io/twitter/follow/Idered?style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n\n```sh\nnpm i @idered/twix\n```\n\nTo get IntelliSense working, add this to your Visual Studio Config:\n\n```json\n\"tailwindCSS.experimental.classRegex\": [\n  \"twix\\\\([\\\\s\\\\S]*?'([^']*)'\\\\s?\\\\)\",\n  \"twix\\\\([\\\\s\\\\S]*?\\\"([^\\\"]*)\\\"\\\\s?\\\\)\",\n  \"twix\\\\([\\\\s\\\\S]*?`([^`]*)`\\\\s?\\\\)\"\n]\n```\n\n## Usage\n\n```tsx\n// components/checkbox.tsx\nimport { twix } from \"@idered/twix\";\nimport * as Checkbox from \"@radix-ui/react-checkbox\";\n\nexport const Root = twix(\n  Checkbox.Root,\n  \"border border-slate-300 hover:border-slate-500 rounded w-8 h-8 flex items-center justify-center aria-checked:border-blue-500\"\n);\n\nexport const Indicator = twix(Checkbox.Indicator, \"text-indigo-500\");\n```\n\n```tsx\n// app.tsx\nimport * as Checkbox from \"./components/checkbox.tsx\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\n\nexport default () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003cCheckbox.Root\u003e\n        \u003cCheckbox.Indicator\u003e\n          \u003cCheckIcon /\u003e\n        \u003c/Checkbox.Indicator\u003e\n      \u003c/Checkbox.Root\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n## Styling based on state\n\nUse [ARIA states](https://tailwindcss.com/docs/hover-focus-and-other-states#aria-states).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidered%2Ftwix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidered%2Ftwix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidered%2Ftwix/lists"}