New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-bem

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-bem

Provides a simple API for generating BEM like class names.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
1
Weekly downloads
 
Created
Source

Create BEM

Provides a simple API for generating BEM like class names.

Installation

Install using the NPM:

npm install -S create-bem

Usage Example

A simple use case in a ReactJS component:

import React from 'react';
import createBEM from 'create-bem';

let bem = createBEM('Modal');

const Modal = ({ children, title, open }) => (
  <div className={ bem.md('open', open) }>
    <div className={ bem.el('heading').md('warning') }>{ title }</div>
    <div className={ bem.el('body') }>{ children }</div>
  </div>
);

And this component will get those CSS class names, according to the properties:

Modal
Modal Modal--open
Modal__heading Modal__heading--warning
Modal__body

License

MIT

Keywords

FAQs

Package last updated on 01 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc