Skip to content

Variable: BEM_BLOCK ​

ts
const BEM_BLOCK: Regex<"\\.(?<block>[A-Za-z_][\\w-]*)", {
  flags: "u";
  names: {
     block: string;
  };
}>;

Defined in: packages/regex/src/tiers/cssdoc-local.ts:196

BEM Block Pattern Matches a CSS class selector that is exactly one class (the component block). Used to identify the main documented component's class.

Example ​

ts
BEM_BLOCK.exec(".button")?.groups?.block // "button"
BEM_BLOCK.exec(".my-component")?.groups?.block // "my-component"

Released under the MIT License