mcpField
S
sgds-pattern-page-templates

sgds-pattern-page-templates

github.com/govtechsgDesign & UI1838 installsUpdated 2d ago
Repository

About sgds-pattern-page-templates

SGDS Page Templates is a skill offering full-page layouts built with SGDS components and utilities. It is for people creating dashboards, login pages, forms, lists, or profile pages, and includes shared visual guidance and a required application shell.

Key features

  1. 01Templates for dashboards, login, and forms
  2. 02Templates for lists and about pages
  3. 03Built with SGDS components and utilities
  4. 04Guidance on backgrounds, spacing, and cards
  5. 05Requires an application shell on each page

Use cases

  1. 01Build an admin portal or internal tool
  2. 02Create a login or sign-up page
  3. 03Make a settings form or data list
  4. 04Create an agency or product profile page

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/govtechsg/sgds-web-component --skill sgds-pattern-page-templates

After installing, type/sgds-pattern-page-templatesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

reference/
about-us.md
dashboard.md
form-page.md
list-page.md
login.md

Details

From the project README

SGDS Page Templates

Ready-to-use full-page templates using SGDS components and utilities — adapted from the visual patterns of shadcn Blocks. Each template gives a beautiful starting point without writing layout code from scratch.

Prerequisites

Every page must include the Application Shell. Read sgds-pattern-block-templates → reference/application-shell.md before generating any page. The shell provides mandatory <sgds-masthead>, <sgds-mainnav>, and <sgds-footer> on every page, plus container class selection (.sgds-container vs .sgds-container-sidebar) and sticky-header conventions. Never generate a page template without all three shell components.

import "@govtechsg/sgds-web-component/themes/day.css";
import "@govtechsg/sgds-web-component/css/sgds.css";
import "@govtechsg/sgds-web-component/css/utility.css";

See sgds-getting-started and sgds-components for full installation.

For container width and max-width utilities used in these templates, see sgds-utilities.


Quick Decision Guide

What you're buildingTemplate to use
Internal tool, admin portal, dashboardDashboard
Login / sign-in pageLogin
Multi-field settings or data-entry formForm Page
Data list with search, filters, paginationList Page
Company/agency profile, team intro, achievementsAbout Us

→ Read reference/dashboard.md

Sidebar navigation + stat cards row + data table. Use for dashboards, admin portals, internal tools.

Note: The dashboard template uses sgds-sidebar (RC component). Load the CDN script before other SGDS imports — see sgds-components sidebar reference for the CDN tag and framework setup.

→ Read reference/login.md

Centered card with email/password form. Use for authentication, sign-in, sign-up pages.

→ Read reference/form-page.md

Two-column settings layout with labelled form sections. Use for settings pages, profile pages, multi-section data entry.

→ Read reference/list-page.md

Search + filter bar + table + pagination. Use for record lists, search results, data management pages.

→ Read reference/about-us.md

Two-column headline + image grid + logo strip + achievements stats panel. Use for agency profiles, product about pages, team introductions.


Visual Hierarchy Principles (apply to all templates)

These are the rules that make SGDS UIs look polished — the same principles shadcn/Mantine use:

1. Layer backgrounds to create depth

  • Page background: sgds:bg-surface-default (the base canvas)
  • Cards / panels: sgds:bg-surface-raised (lifts content off the page)
  • Nested content areas: sgds:bg-surface-overlay sparingly

2. Use semantic spacing, not raw numbers Prefer sgds:p-layout-md, sgds:gap-layout-md, sgds:p-component-md over sgds:p-4. Semantic tokens are responsive and encode intent. Always apply whitespace between sections and elements — never render blocks without spacing. See sgds-utilities-spacing for the full defaults table.

3. Consistent card anatomy Every card: padding inside (sgds:p-component-lg), gap between card rows (sgds:gap-layout-md), border-radius (sgds:rounded-lg), subtle shadow (sgds:shadow-card).

4. Action hierarchy in forms Primary action → <sgds-button variant="primary">. Secondary / cancel → <sgds-button variant="outline">. Destructive → <sgds-button variant="ghost" tone="danger">.

5. Muted labels, prominent values In stat cards and description lists: label in sgds:text-muted sgds:text-sm, value in sgds:text-default sgds:text-2xl sgds:font-semibold.

Comments

Markdown supported