An open API service indexing awesome lists of open source software.

https://github.com/eduardoborges/bemfy

🪛 A stupid simple BEM compose helper to keep your HTML clean.
https://github.com/eduardoborges/bemfy

bem bem-css classnames helper react

Last synced: 3 months ago
JSON representation

🪛 A stupid simple BEM compose helper to keep your HTML clean.

Awesome Lists containing this project

README

          

# bemfy [![NPM](https://img.shields.io/npm/v/bemfy.svg)](https://www.npmjs.com/package/bemfy) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

> 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 less [500B](http://bundlephobia.com/result?p=bemfy).
- No deps

## Install

```bash
npm install --save bemfy
```

## Usage

```tsx
import React from 'react';
import bemfy, { c } from 'bemfy'

const Component = () => {
const b = bemfy("custom-button");

return


The lazy cat jumps over dizzy fox

Jump!

}

export default Component;
```

This will render:

```html


The lazy cat jumps over dizzy fox

Jump!

```

## License

MIT © [Eduardo Borges](https://github.com/eduardoborges)