BemController
Defined in: lit/src/bemController.js:16
Computes a BEM class name from the current block context and the host’s
modifier properties — the analog of @bem-broom/react’s useBem. It only
reads the block from context (it never re-roots), so use it for class names
on a component’s internal render nodes. Subscribed context consumers request
a host update when the block or config changes.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BemController(
host,element,options?):BemController
Defined in: lit/src/bemController.js:28
Parameters
Section titled “Parameters”ReactiveControllerHost & HTMLElement
element
Section titled “element”string
options?
Section titled “options?”BemControllerOptions = {}
Returns
Section titled “Returns”BemController
Properties
Section titled “Properties”block:
string|false|undefined
Defined in: lit/src/bemController.js:32
element
Section titled “element”element:
string
Defined in: lit/src/bemController.js:30
host:
ReactiveControllerHost&HTMLElement
Defined in: lit/src/bemController.js:29
modifiers
Section titled “modifiers”modifiers:
string[]
Defined in: lit/src/bemController.js:31
Accessors
Section titled “Accessors”className
Section titled “className”Get Signature
Section titled “Get Signature”get className():
string
Defined in: lit/src/bemController.js:44
Returns
Section titled “Returns”string
The computed BEM class name.
