{"id":49635268,"url":"https://github.com/redneckz/react-bem-helper","last_synced_at":"2026-05-05T14:34:26.672Z","repository":{"id":39351514,"uuid":"89123839","full_name":"redneckz/react-bem-helper","owner":"redneckz","description":"BEM library for React","archived":false,"fork":false,"pushed_at":"2023-01-03T15:15:19.000Z","size":2073,"stargazers_count":21,"open_issues_count":12,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-08T21:36:48.788Z","etag":null,"topics":["bem","bem-css","bem-methodology","flow","react"],"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/redneckz.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":"2017-04-23T07:08:10.000Z","updated_at":"2022-08-01T00:39:22.000Z","dependencies_parsed_at":"2023-02-01T06:45:14.049Z","dependency_job_id":null,"html_url":"https://github.com/redneckz/react-bem-helper","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/redneckz/react-bem-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Freact-bem-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Freact-bem-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Freact-bem-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Freact-bem-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redneckz","download_url":"https://codeload.github.com/redneckz/react-bem-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Freact-bem-helper/sbom","scorecard":{"id":767909,"data":{"date":"2025-08-11","repo":{"name":"github.com/redneckz/react-bem-helper","commit":"5495f32a8807c1fb9d2fd49389e75fb0e52579e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/23 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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"51 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-6chw-6frg-f759","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-3gx7-xhv7-5mx3","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","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-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","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-h9rv-jmmf-4pgx","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","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-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","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-23T01:23:18.243Z","repository_id":39351514,"created_at":"2025-08-23T01:23:18.243Z","updated_at":"2025-08-23T01:23:18.243Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["bem","bem-css","bem-methodology","flow","react"],"created_at":"2026-05-05T14:34:23.725Z","updated_at":"2026-05-05T14:34:26.661Z","avatar_url":"https://github.com/redneckz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-bem-helper\n\nBEM library for React\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![Bundle size][bundlephobia-image]][bundlephobia-url]\n\n# Table of Contents\n\n- [react-bem-helper](#react-bem-helper)\n- [Table of Contents](#Table-of-Contents)\n- [Installation](#Installation)\n- [Motivation](#Motivation)\n- [Features](#Features)\n- [Prerequisites](#Prerequisites)\n- [Usage](#Usage)\n  - [Configuration](#Configuration)\n    - [BEM naming convention](#BEM-naming-convention)\n    - [Flow](#Flow)\n- [License](#License)\n\n# Installation\n\n```bash\n$ npm install --save @redneckz/react-bem-helper\n```\n\n```bash\n$ yarn add @redneckz/react-bem-helper\n```\n\n# Motivation\n\nThis utility helps to declare BEM entities in terms of React components.\nPrimarily it useful for projects with CSS artifacts (Sass, Less, PostCSS, ...).\n\nAlso compared to other libraries this one is aimed at simplicity and\nincremental adaptation of BEM (even for proprietary projects).\n\n# Features\n\n1.  Configurable\n2.  BEM mixins support\n3.  Modular CSS support\n4.  Flow definitions\n5.  Very small bundle ~8Kb\n6.  Almost no dependencies\n\n# Prerequisites\n\n1.  [BEM Methodology](https://en.bem.info/methodology/)\n2.  [Higher-Order Components](https://reactjs.org/docs/higher-order-components.html)\n3.  [Flow](https://flow.org/en/)\n4.  [classnames](https://www.npmjs.com/package/classnames)\n\n# Usage\n\n```sass\n.some-button\n    padding: 8px\n\n    \u0026--major\n        background: blue\n\n    \u0026--size\n        \u0026--small\n            padding: 4px\n        \u0026--large\n            padding: 16px\n```\n\n```jsx\nimport React from 'react';\nimport { BEM } from '@redneckz/react-bem-helper';\nimport styles from './some-button.sass';\n\nconst someButton = BEM(styles);\n\nexport const SomeButton = someButton(({ className, disabled, children }) =\u003e (\n    \u003cbutton className={className} disabled={disabled}\u003e\n        {children}\n    \u003c/button\u003e\n));\n```\n\n```jsx\n\u003cReact.Fragment\u003e\n    \u003cSomeButton major\u003eMajor\u003c/SomeButton\u003e\n    \u003cSomeButton size=\"small\"\u003eSmall\u003c/SomeButton\u003e\n    \u003cSomeButton major size=\"large\"\u003e\n        Large\n    \u003c/SomeButton\u003e\n    \u003cSomeButton disabled\u003eDisabled\u003c/SomeButton\u003e\n\u003c/React.Fragment\u003e\n```\n\nwill produce\n\n```html\n\u003cbutton class=\"some-button some-button--major\"\u003eMajor\u003c/button\u003e\n\u003cbutton class=\"some-button some-button--size--small\"\u003eSmall\u003c/button\u003e\n\u003cbutton class=\"some-button some-button--major some-button--size--large\"\u003eLarge\u003c/button\u003e\n\u003cbutton class=\"some-button\" disabled\u003eDisabled\u003c/button\u003e\n```\n\nAny valid component can be used to declare block or its elements\n\n```jsx\nexport const SomeButton = someButton(\n    class extends React.PureComponent {\n        render() {\n            const { className, disabled, children } = this.props;\n            return (\n                \u003cbutton className={className} disabled={disabled}\u003e\n                    {children}\n                \u003c/button\u003e\n            );\n        }\n    },\n);\n```\n\n```javascript\nexport const SomeButton = someButton('button'); // DOM component\n```\n\nAlso library provides several factory functions to declare DOM components\nwith restricted attributes list (div, span, form, button, input, label, textarea)\n\n```javascript\nimport React from 'react';\nimport { BEM, div } from '@redneckz/react-bem-helper';\nimport styles from './some-button.sass';\n\nconst someButton = BEM(styles);\n\nexport const SomeButton = someButton(div({ role: 'button' }));\n```\n\nBlock with elements\n\n```sass\n.panel\n    display: flex\n\n    \u0026__item\n        flex-grow: 0\n\n        \u0026--align\n            \u0026--start\n                align-self: flex-start\n            \u0026--center\n                align-self: center\n            \u0026--end\n                align-self: flex-end\n\n    \u0026__spread\n        flex-grow: 1\n```\n\n```javascript\nimport React from 'react';\nimport { BEM, div } from '@redneckz/react-bem-helper';\nimport styles from './panel.sass';\n\nconst panel = BEM(styles);\n\nexport const Panel = panel('div');\nexport const PanelItem = panel.item(div());\nexport const PanelSpread = panel.spread('div');\n```\n\n## Configuration\n\n### BEM naming convention\n\n```javascript\nimport React from 'react';\nimport { Config } from '@redneckz/react-bem-helper';\n\nConfig.ELEMENT_SEPARATOR = '__';\nConfig.MODIFIER_SEPARATOR = '--';\n```\n\n### Flow\n\nGenerate stub for [classnames](https://www.npmjs.com/package/classnames)\n\n```bash\n$ flow-typed create-stub classnames@x.x.x\n```\n\nDo not forget to configure includes and ignores to put library into scope.\n\n# License\n\n[MIT](http://vjpr.mit-license.org)\n\n[npm-image]: https://badge.fury.io/js/%40redneckz%2Freact-bem-helper.svg\n[npm-url]: https://www.npmjs.com/package/%40redneckz%2Freact-bem-helper\n[travis-image]: https://travis-ci.org/redneckz/react-bem-helper.svg?branch=master\n[travis-url]: https://travis-ci.org/redneckz/react-bem-helper\n[coveralls-image]: https://coveralls.io/repos/github/redneckz/react-bem-helper/badge.svg?branch=master\n[coveralls-url]: https://coveralls.io/github/redneckz/react-bem-helper?branch=master\n[bundlephobia-image]: https://badgen.net/bundlephobia/min/@redneckz/react-bem-helper\n[bundlephobia-url]: https://bundlephobia.com/result?p=@redneckz/react-bem-helper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredneckz%2Freact-bem-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredneckz%2Freact-bem-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredneckz%2Freact-bem-helper/lists"}