Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awinogradov/recn
Blazing fast. Tiny size < 200 B. The last one BEM className helper.
https://github.com/awinogradov/recn
bem classnames react
Last synced: 7 days ago
JSON representation
Blazing fast. Tiny size < 200 B. The last one BEM className helper.
- Host: GitHub
- URL: https://github.com/awinogradov/recn
- Owner: awinogradov
- License: mit
- Created: 2018-10-12T22:06:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T14:27:22.000Z (about 6 years ago)
- Last Synced: 2024-04-23T16:20:45.208Z (8 months ago)
- Topics: bem, classnames, react
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - recn - Blazing fast. Tiny size < 200 B. The last one BEM className helper. (TypeScript)
README
# ReCn [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/recn.svg)](https://bundlephobia.com/result?p=recn)
Blazing fast. Tiny size. The last one className helper.
## Usage
> npm i -S recn
``` ts
import { cn } from 'recn';const cat = cn('Cat');
cat(); // Cat
cat({ size: 'm' }); // Cat_size_m
cat('Tail'); // Cat-Tail
cat('Tail', { length: 'small' }); // Cat-Tail_length_smallconst dogPaw = cn('Dog', 'Paw');
dogPaw(); // Dog-Paw
dogPaw({ color: 'black', exists: true }); // Dog-Paw_color_black Dog-Paw_exists
```### License [MIT](LICENSE)