sgds-theming

Customizes SGDS application themes by overriding CSS tokens for brand colours, night mode, and fonts.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/HiokKuek/hdb_pricing --skill sgds-theming-hiokkuek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sgds-theming
Source: https://github.com/HiokKuek/hdb_pricing/tree/main/.agents/skills/sgds-theming
Command: npx skills add https://github.com/HiokKuek/hdb_pricing --skill sgds-theming-hiokkuek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @govtechsg/sgds-web-component.

What problem does it solve? Developers using the Singapore Government Design System (SGDS) need to retheme applications with their own brand colours, enable dark mode, or change fonts without breaking component styling, and this Skill provides the exact CSS token override patterns to do so. ## Core Features & Use Cases - Brand Colour Overrides: Replace the default purple primary colour by overriding the --sgds-product-primary-100 through --sgds-product-primary-900 primitive token scale. - GovTech Colour Palettes: Apply one of six pre-approved GovTech colours from themes/gt/ by mapping --gt-color-* variables onto the product primary scale. - Night Mode Support: Enable dark mode by importing themes/night.css and toggling the sgds-night-theme class on the <html> element. - Font Customization: Change the default Inter typeface by overriding --sgds-font-family-brand and loading your own font assets. - Use Case: A GovTech team building a new portal needs the official blue brand colour and optional dark mode; this Skill guides them to import themes/gt/blue.css, map the GT tokens, and add the night theme class. ## Quick Start Ask the AI to change your SGDS app's primary brand colour to your custom hex palette and explain the correct CSS import order.

Frequently Asked Questions about sgds-theming

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

FAQPage Schema
How do I change the primary colour in SGDS web components?

Override the primitive tokens `--sgds-product-primary-100` through `--sgds-product-primary-900` in a custom CSS file imported after `themes/day.css`. The semantic tokens reference these primitives, so all primary-coloured components update automatically.

How to enable dark mode in an SGDS application?

Import both `themes/day.css` and `themes/night.css`, then add the `sgds-night-theme` class to the `<html>` element. You can toggle it at runtime with `document.documentElement.classList.toggle("sgds-night-theme")`.

Can GovTech products use custom brand colours in SGDS?

No, GovTech products must use one of the six pre-approved palettes in `themes/gt/` (blue, cyan, magenta, pink, purple, red). Import exactly one GT colour file and map its `--gt-color-*` variables onto the `--sgds-product-primary-*` scale.

Why is my SGDS CSS override not working?

The most common cause is import order: your custom CSS must be loaded after `themes/day.css`, otherwise the theme file overwrites your overrides. For GovTech colours, the GT file must come after day.css but before your mapping CSS.

Does SGDS load custom fonts automatically?

No, SGDS does not load custom font assets. After overriding `--sgds-font-family-brand`, you must load the font yourself via a `<link>` tag or `@font-face` declaration.