Skip to content

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.

new BemController(host, element, options?): BemController

Defined in: lit/src/bemController.js:28

ReactiveControllerHost & HTMLElement

string

BemControllerOptions = {}

BemController

block: string | false | undefined

Defined in: lit/src/bemController.js:32


element: string

Defined in: lit/src/bemController.js:30


host: ReactiveControllerHost & HTMLElement

Defined in: lit/src/bemController.js:29


modifiers: string[]

Defined in: lit/src/bemController.js:31

get className(): string

Defined in: lit/src/bemController.js:44

string

The computed BEM class name.