#73
Use macros for items
Components and Patterns · Practitioner
What is this skill?
Using macros for items involves implementing GOV.UK Frontend macros with data from loops to generate repeated elements like radio options, checkbox items, or summary list rows dynamically.
Why is it important?
- Dynamic lists – Generate options from data rather than hard-coding
- Maintainability – Change data in one place to update everywhere
- Consistency – Each item uses the same component structure
- Efficiency – Quickly add or remove items by editing data