upline/bem-classname

Installs: 223

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/upline/bem-classname

dev-main 2021-09-08 17:08 UTC

This package is not auto-updated.

Last update: 2025-10-03 08:18:07 UTC


README

Implementation of bem-react/classname in php

Usage:

$preset = new BemPreset();
$factory = new BemFactory($preset);
$block = $factory->block('test');

$block->cn(['color' => 'yellow', 'active']); // test test_color_yellow test_active

$block->element('elem', ['type' => 'button', 'active']); // test__elem test__elem_button_yellow __elem_active