Skip to content

Variable: ELEMENT_NAME ​

ts
const ELEMENT_NAME: Regex<"(?<base>[A-Za-z_][\\w-]*)__(?<element>[A-Za-z_][\\w-]*)", {
  flags: "u";
  names: {
     base: string;
     element: string;
  };
}>;

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

Element/Part Name Pattern Matches BEM-style element names: base connected with __ separator. Pattern: .base__element Used for structured part/element extraction.

Example ​

ts
ELEMENT_NAME.exec("button__icon")?.groups // { base: "button", element: "icon" }

Released under the MIT License