Template Weaver
When to use this skill
- •Use when you need consistent page scaffolding (headers, sidebars, footers) across pages.
- •Triggered by requests to standardize page layouts or to create reusable layout wrappers.
Instructions
- •
First Step: Define required regions (header, nav, main, aside, footer) and how children will be injected (React
childrenor named slots via props). - •
Second Step: Implement layouts in
src/components/templates/and ensure they accept achildrenprop and optional slot props (e.g.,sidebar). - •
Third Step: Use templates in pages under
src/pages/and provide examples of composition.
Examples
- •DashboardLayout:
<DashboardLayout sidebar={<ProfileCard/>}><PaperFeed/></DashboardLayout>
Notes
- •Templates should not contain heavy business logic; keep them focused on layout and accessibility (skip links, landmark roles).