Nunjucks macros vs HTML for design system components
Decide when to use macros vs raw HTML, and keep components maintainable.
Goal
Choose the right approach for speed and maintainability.
Steps
- Pick a component (e.g. input, radios, summary list).
- Implement it using macro.
- Implement it using HTML.
- Compare readability, flexibility, and reuse.
Notes
Source inspiration: hippo-prototyping discussion https://github.com/hippo-digital/hippo-prototyping/discussions/39