{"id":32708717,"url":"https://github.com/mo7amed4a/tw-react-if","last_synced_at":"2026-05-01T21:03:01.320Z","repository":{"id":319990983,"uuid":"1080364263","full_name":"mo7amed4a/tw-react-if","owner":"mo7amed4a","description":"A simple and lightweight React component for conditional rendering.   Supports three modes: CSS display, Tailwind `hidden`, and full removal from the DOM.","archived":false,"fork":false,"pushed_at":"2025-10-21T10:09:54.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-21T11:24:11.574Z","etag":null,"topics":["bun","react","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tw-react-if","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/mo7amed4a.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,"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":"2025-10-21T09:05:42.000Z","updated_at":"2025-10-21T10:09:58.000Z","dependencies_parsed_at":"2025-10-21T11:24:47.862Z","dependency_job_id":"526e82d0-3336-44c5-b649-9545d067644b","html_url":"https://github.com/mo7amed4a/tw-react-if","commit_stats":null,"previous_names":["mo7amed4a/tw-react-if"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mo7amed4a/tw-react-if","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo7amed4a%2Ftw-react-if","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo7amed4a%2Ftw-react-if/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo7amed4a%2Ftw-react-if/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo7amed4a%2Ftw-react-if/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mo7amed4a","download_url":"https://codeload.github.com/mo7amed4a/tw-react-if/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mo7amed4a%2Ftw-react-if/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["bun","react","typescript"],"created_at":"2025-11-02T04:00:38.652Z","updated_at":"2026-05-01T21:03:01.295Z","avatar_url":"https://github.com/mo7amed4a.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tw-react-if\n\nA simple and lightweight React component for conditional rendering.  \nSupports three modes: CSS display, Tailwind `hidden`, and full removal from the DOM.\n\n## Installation\n\n```bash\nbun add tw-react-if\n```\n\nor with npm:\n\n```bash\nnpm install tw-react-if\n```\n\n## Usage\n\n```tsx\nimport { IF } from \"tw-react-if\";\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cIF condition={true} mode=\"display\"\u003e\n        \u003cp\u003eVisible using CSS display\u003c/p\u003e\n      \u003c/IF\u003e\n\n      \u003cIF condition={false} mode=\"tailwind\"\u003e\n        \u003cp\u003eHidden using Tailwind\u003c/p\u003e\n      \u003c/IF\u003e\n\n      \u003cIF condition={false} mode=\"remove\"\u003e\n        \u003cp\u003eThis will not be rendered at all\u003c/p\u003e\n      \u003c/IF\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Props\n\n| Name       | Type      | Default     | Description |\n|-------------|-----------|-------------|--------------|\n| `condition` | `boolean` | `required`  | The condition to render or hide children. |\n| `mode`      | `\"display\"`, `\"tailwind\"`, `\"remove\"` | `\"display\"` | Defines the hiding method. |\n| `display`   | `string`  | `\"block\"`   | The display style when visible. |\n\n## License\n\nMIT © Mohamed Abdelrahman\n\n[![Follow @mo7amed4a on GitHub](https://img.shields.io/github/followers/mo7amed4a?label=Follow\u0026style=social)](https://github.com/mo7amed4a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo7amed4a%2Ftw-react-if","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmo7amed4a%2Ftw-react-if","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo7amed4a%2Ftw-react-if/lists"}