bricks_generate_bem_component
Generate BEM components as global CSS classes with a single call. Specify block, elements, and optional modifiers to create consistent naming (block, __element, --modifier).
Instructions
Generate a complete BEM component as global CSS classes. Creates block, element (__), and modifier (--) classes in one call. Uses bulk upsert so it is safe to re-run. Example: block="pricing-card" with elements title, price, cta creates: pricing-card, pricing-card__title, pricing-card__price, pricing-card__cta.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block | Yes | BEM block name (e.g., "pricing-card", "hero", "testimonial") | |
| elements | Yes | Map of element names to Bricks settings. Use "_root" for the block-level styles. Example: { "_root": { _padding: {...} }, "title": { _typography: {...} } } | |
| modifiers | No | Optional map of modifier names to Bricks settings. Example: { "featured": { _borderColor: {...} }, "dark": { _background: {...} } } |