{"id":19377788,"url":"https://github.com/rosswaycaster/twnd","last_synced_at":"2026-05-13T22:37:33.770Z","repository":{"id":42867270,"uuid":"258923299","full_name":"rosswaycaster/twnd","owner":"rosswaycaster","description":"A simple utility for compiling a readable list of tailwindcss classes","archived":false,"fork":false,"pushed_at":"2023-06-01T04:47:03.000Z","size":1653,"stargazers_count":2,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T10:18:45.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rosswaycaster.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}},"created_at":"2020-04-26T02:44:26.000Z","updated_at":"2020-11-16T22:11:21.000Z","dependencies_parsed_at":"2024-11-10T09:03:42.191Z","dependency_job_id":null,"html_url":"https://github.com/rosswaycaster/twnd","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"cf31f932142b35b02cdf88afbc2fb4bfe54ed1bd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rosswaycaster/twnd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosswaycaster%2Ftwnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosswaycaster%2Ftwnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosswaycaster%2Ftwnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosswaycaster%2Ftwnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosswaycaster","download_url":"https://codeload.github.com/rosswaycaster/twnd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosswaycaster%2Ftwnd/sbom","scorecard":{"id":785308,"data":{"date":"2025-08-11","repo":{"name":"github.com/rosswaycaster/twnd","commit":"cf31f932142b35b02cdf88afbc2fb4bfe54ed1bd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-v4rh-8p82-6h5w","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T05:56:35.043Z","repository_id":42867270,"created_at":"2025-08-23T05:56:35.043Z","updated_at":"2025-08-23T05:56:35.043Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33003120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"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":[],"created_at":"2024-11-10T09:03:35.499Z","updated_at":"2026-05-13T22:37:33.740Z","avatar_url":"https://github.com/rosswaycaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twnd\n\n[![npm](https://img.shields.io/npm/v/twnd?color=success)](https://www.npmjs.com/package/twnd) [![npm bundle size](https://img.shields.io/bundlephobia/min/twnd?color=brightgreen)](https://www.npmjs.com/package/twnd) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/rosswaycaster/twnd/blob/master/LICENSE)\n\nA simple utility for compiling a readable list of tailwindcss classes.\n\nThe goal of `twnd` is to provide an easy way to manage and compose tailwindcss classes.\n\n```jsx\ntwnd(\n  'bg-gray-200 rounded text-gray-700',\n  'hover: bg-white border-gray-300',\n  'focus: bg-white',\n  'lg: px-4 py-2',\n  'lg:hover: bg-gray-100 text-gray-600'\n)\n\n// bg-gray-200 rounded text-gray-700 hover:bg-white hover:border-gray-300 focus:bg-white lg:px-4 lg:py-2 lg:hover:bg-gray-100 lg:hover:text-gray-600\n```\n\n## Installation\n\n```jsx\n// yarn\nyarn add twnd\n\n// npm\nnpm install twnd --save\n```\n\n## Usage\n\n```jsx\nimport twnd from 'twnd'\n\nor\n\nvar twnd = require('twnd')\n```\n\n---\n\n`twnd` is a function that take an infinite amount of arguments. These arguments should either be `strings` or `arrays`. Nested arrays are okay too!\n\n#### Strings\n\nStrings **without** a prefix (`hover:`, `focus:`, `lg:`, `lg:hover:`...) are outputted as they are. However, strings **with** a prefix will add that prefix to each of the classes in that string.\n\nFor example:\n\n```jsx\nconst Button = ({ children, warning, border }) =\u003e {\n  return (\n    \u003cbutton\n      className={twnd(\n        'flex-1 bg-gray-200 appearance-none border border-transparent rounded w-full py-2 px-4 text-gray-700 leading-tight',\n        'hover: bg-white border-gray-300',\n        'focus: outline-none bg-white shadow-outline border-gray-300',\n        'lg: border-gray-600 bg-gray-200',\n        'lg:hover: bg-gray-100 text-gray-600'\n      )}\n    \u003e\n      {children}\n    \u003c/button\u003e\n  )\n}\n```\n\nis the same as typing out all of these classes:\n\n```jsx\nconst Button = ({ children, warning, border }) =\u003e {\n  return (\n    \u003cbutton className=\"ml-4 flex-shrink-0 bg-teal-500 text-white font-bold py-2 px-4 rounded hover:bg-teal-600 focus:outline-none focus:shadow-outline lg:ml-0 lg:py-0 lg:px-0 lg:hover:uppercase lg:hover:text-teal-300\"\u003e\n      {children}\n    \u003c/button\u003e\n  )\n}\n```\n\n#### Arrays\n\nIn this example we will use React to build a `Button` component that accepts `rounded` and `border` props. As you can see, you can easily apply specific classes based on if the prop is truthy or not.\n\n```jsx\nconst Button = ({ children, rounded, border }) =\u003e {\n  return (\n    \u003cbutton\n      className={twnd(\n        'inline-block text-sm px-4 py-2 ml-4 leading-none text-white mt-4',\n        'hover: text-teal-500 bg-white',\n        'lg: mt-0',\n        rounded \u0026\u0026 'rounded',\n        border \u0026\u0026 ['border border-white', 'hover: border-transparent']\n      )}\n    \u003e\n      {children}\n    \u003c/button\u003e\n  )\n}\n```\n\n#### Composing Styles\n\nYou can also use `twnd` to compose styles.\n\n```jsx\nconst Button = ({ children, buttonStyle = 'default', rounded, border }) =\u003e {\n  const baseStyles = twnd(\n    'appearance-none py-2 px-4 leading-tight border',\n    'lg: text-lg py-4 px-6',\n    rounded \u0026\u0026 'rounded',\n    !border \u0026\u0026 'border-transparent'\n  )\n  const buttonStyles = {\n    default: twnd(\n      baseStyles,\n      'bg-gray-200 text-gray-700',\n      'hover: bg-gray-400 text-gray-900',\n      border \u0026\u0026 ['border-gray-500', 'hover: border-gray-700']\n    ),\n    warning: twnd(\n      baseStyles,\n      'bg-red-200 text-red-700',\n      'hover: bg-red-400 text-red-900',\n      border \u0026\u0026 ['border-red-500', 'hover: border-red-900']\n    ),\n  }\n\n  return \u003cbutton className={buttonStyles[buttonStyle]}\u003e{children}\u003c/button\u003e\n}\n```\n\n##### Output\n\n```jsx\n// \u003cButton rounded border\u003eLogin\u003c/Button\u003e\n\n\u003cbutton class=\"appearance-none py-2 px-4 leading-tight border lg:text-lg lg:py-4 lg:px-6 rounded bg-gray-200 text-gray-700 hover:bg-gray-400 hover:text-gray-900 border-gray-500 hover:border-gray-700\"\u003e\n  Login\n\u003c/button\u003e\n```\n\n```jsx\n// \u003cButton buttonStyle=\"warning\" border\u003eLogin\u003c/Button\u003e\n\n\u003cbutton class=\"appearance-none py-2 px-4 leading-tight border lg:text-lg lg:py-4 lg:px-6 bg-red-200 text-red-700 hover:bg-red-400 hover:text-red-900 border-red-500 hover:border-red-900\"\u003e\n  Login\n\u003c/button\u003e\n```\n\n---\n\n👋 ![HitCount](http://hits.dwyl.com/rosswaycaster/twnd.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosswaycaster%2Ftwnd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosswaycaster%2Ftwnd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosswaycaster%2Ftwnd/lists"}