- Notifications
You must be signed in to change notification settings - Fork0
eduardoborges/bemfy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A stupid simple BEM compose helper to keep your HTML clean.
- Works with any library/framework.
- Add and remove independent class names with truthy or falsy value.
- Fast!
- Ridiculously tiny at less500B.
- No deps
npm install --save bemfy
importReactfrom'react';importbemfy,{c}from'bemfy'constComponent=()=>{constb=bemfy("custom-button");return<divclassName={b('wrapper')}><divclassName={b('text','white')}>The lazy cat jumps over dizzy fox</div><buttonclassName={b('button','primary')}>Jump!</button></div>}exportdefaultComponent;
This will render:
<divclass="custom-button__wrapper"><divclass="custom-button__text--white">The lazy cat jumps over dizzy fox</div><buttonclass="custom-button__button--primary">Jump!</button></div>
MIT ©Eduardo Borges
About
🪛 A stupid simple BEM compose helper to keep your HTML clean.