eldir-create-theme-component

star 0

Create reusable Eldir theme-hook components end to end. Use when a UI element should be implemented as a custom theme hook with Twig template, preprocess formatting, and reusable CSS.

argopecten By argopecten schedule Updated 3/2/2026

name: eldir-create-theme-component description: Create reusable Eldir theme-hook components end to end. Use when a UI element should be implemented as a custom theme hook with Twig template, preprocess formatting, and reusable CSS.

Eldir Create Theme Component

  1. Register the custom hook in eldir_theme() in eldir.theme.
  2. Define minimal variables and include attributes support.
  3. Create Twig template in templates/components/.
  4. Add eldir_preprocess_<hook>() only for presentation formatting.
  5. Add BEM styles in css/components.css.
  6. Replace repeated inline markup with this component where appropriate.

Guardrails

  • Keep variable names consistent across hook registration, preprocess, and Twig.
  • Use CSS custom properties for spacing, color, radius, and typography.
Install via CLI
npx skills add https://github.com/argopecten/aegir-eldir --skill eldir-create-theme-component
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator