layout-patterns

Defines app shell, sidebar, header, and focus mode layout conventions for React pages.

3|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/nghyane/VSTEP --skill layout-patterns-nghyane
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: layout-patterns
Source: https://github.com/nghyane/VSTEP/tree/main/apps/frontend-v3/.agents/skills/layout-patterns
Command: npx skills add https://github.com/nghyane/VSTEP --skill layout-patterns-nghyane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend developers often create inconsistent page layouts when building new screens, leading to mismatched content widths, duplicated sidebar logic, and broken navigation patterns across the application. ## Core Features & Use Cases - App Shell Conventions: Documents the sidebar + outlet structure in src/routes/_app.tsx with auth guard, fixed 260px sidebar, and header containing page title, gem/streak indicators, and ProfileDropdown. - Content Width Rules: Standardizes max-width choices per page type — full width for dashboards, max-w-3xl/max-w-2xl for reading and forms, max-w-lg centered for focus mode. - Focus Mode Layout: Provides a dedicated layout route (src/routes/_focused.tsx) without sidebar or header, plus shared components like FocusBar, FocusComplete, FocusEmpty, and BackLink for flashcard SRS, exercises, and exams. - Use Case: When creating a new exam page, load this Skill to correctly place it under the focus mode layout with FocusBar progress tracking instead of the standard sidebar shell. ## Quick Start Load the layout-patterns skill and create a new exam page using the focus mode layout with a FocusBar and completion screen.

Frequently Asked Questions about layout-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new page with a sidebar layout in React Router?▼

Place the page under the `_app.tsx` layout route, which provides the 260px fixed sidebar, header with page title and profile dropdown, and an auth guard via useEffect. The page content renders through the outlet automatically.

How to build a distraction-free focus mode page for exams?▼

Use the `_focused.tsx` layout route, which removes the sidebar and header entirely. Compose the page with the shared FocusBar for progress and close actions, FocusComplete for results, and FocusEmpty for empty states.

What max-width should I use for different page content types?▼

Dashboards use full width, reading and form pages use max-w-3xl or max-w-2xl, and focus mode content uses max-w-lg centered. Choosing the correct width keeps reading line lengths comfortable and layouts consistent.

When should I use the focus layout instead of the app shell?▼

Use the focus layout for immersive task flows like flashcard SRS review, exercises, and exams where navigation chrome would distract the learner. Use the app shell for browsable pages like dashboards and course listings.

Does the sidebar layout handle authentication automatically?▼

Yes, the `_app.tsx` layout route includes an auth guard implemented via useEffect. Pages nested under it inherit the guard, so individual pages do not need to reimplement authentication checks.