npx skills add ...
npx skills add govtechsg/sgds-web-component --skill sgds-patterns
Complete catalog of reusable typography and text patterns for SGDS applications. Use this skill whenever the user needs to style text, create typography hierarchies, format headings, style lists, or needs consistent text layouts. Also use when the user mentions headings, page titles, body text, lists, paragraphs, display text, content headers, or any typography styling — even if they just say "make a nice heading" or "style my text". Current patterns include headings (H1-H6), display typography (large prominent text), content headers, lists (ordered and unordered), and paragraphs. Each pattern links directly to the raw HTML template for implementation.
npx skills add govtechsg/sgds-web-component --skill sgds-patterns
This skill catalogs all reusable UI patterns available in SGDS. Patterns are production-ready templates that combine SGDS components and utilities to solve common UI needs.
Use this skill whenever you need to:
Before implementing any pattern, ensure you have:
Refer to these skills before asking how to implement a pattern.
Typography patterns define semantic, reusable layouts for text content. All patterns use SGDS utilities for consistent styling and respect the design token hierarchy.
Use the category links below to find specific patterns:
const XxxTemplate = () => html\....`` part) — this is the markup to implementPattern files follow this naming scheme:
Examples:
Typography/Heading/h1.stories.js → H1 pattern (default weight)Typography/Heading/h1-light.stories.js → H1 pattern (light weight)Typography/Display/display-lg-center.stories.js → Large display, center-alignedTypography/List/ul-body-md.stories.js → Unordered list, body-medium sizeVariants indicate:
-light suffix for light font-weight variants-center suffix for center-aligned variantsdisplay-sm, body-md)Here's a quick example of how to use a typography pattern:
Copy the template, substitute your content, and the pattern is ready to use.
All patterns are stored in the repository at stories/patterns/ and available on GitHub. Use the typography category links above to find the exact URL for any pattern:
Each category reference file contains a table with direct links to all patterns in that category.
https://raw.githubusercontent.com/GovTechSG/sgds-web-component/master/stories/patterns/Typography/[Subcategory]/[PatternName].stories.js