Skip to content

buildClassName

buildClassName(args): string

Defined in: packages/webcomponents/src/buildClassName.js:31

Build a BEM class string from a block/element plus a map of modifier values, mirroring @bem-broom/react’s useBem coercion: true--name, an array → one --name_item per item, false/null/undefined → skipped, anything else → --name_String(value) (a throwing toString is silently skipped).

BemConfig = {}

string

Record<string, unknown>

string | undefined

Block from context, or undefined for a root.

string