Loading...
Loading...
Starting point for any new application built with the SGDS web component library. Apply this skill first whenever a user is bootstrapping a new SGDS project, setting up a new app, or asking where to begin with SGDS. Covers font setup, foundation CSS, utilities, components, and app layout in the correct order.
npx skill4agent add govtechsg/sgds-web-component sgds-getting-startedNew to SGDS? See sgds-workflow for the full skill map and reading order before continuing.
<head><head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,600;0,14..32,700;1,14..32,300;1,14..32,400;1,14..32,600;1,14..32,700&display=swap"
rel="stylesheet"
/>
</head>/* e.g. globals.css, index.css, main.css */
/* 1. Theme tokens — must come first */
@import "@govtechsg/sgds-web-component/themes/day.css";
/* Optional — add only if supporting dark/night mode */
@import "@govtechsg/sgds-web-component/themes/night.css";
/* 2. Foundation styles (typography, headings, body, grid) */
@import "@govtechsg/sgds-web-component/css/sgds.css";
/* 3. Utility classes (sgds: prefix) — must be processed by Tailwind */
@import "@govtechsg/sgds-web-component/css/utility.css";utility.cssFor full details on utility class setup, see sgds-utilities.
import "@govtechsg/sgds-web-component";<sgds-*>For React, Vue, Angular, and Next.js-specific integration details, see sgds-components.
| App type | Layout | Container class |
|---|---|---|
| Public-facing, general-purpose | Simple App | |
| Internal tool, dashboard, transactional | Sidebar App | |
<div>
<sgds-masthead fluid></sgds-masthead>
<sgds-mainnav fluid>
<strong slot="brand">My App</strong>
</sgds-mainnav>
</div>
<div class="sgds:flex sgds:flex-col sgds:w-full">
<div class="sgds-container sgds:py-2-xl">
<!-- Page content -->
</div>
<sgds-footer></sgds-footer>
</div><div class="sgds:sticky sgds:top-0">
<sgds-masthead fluid></sgds-masthead>
<sgds-mainnav fluid>
<strong slot="brand">My App</strong>
</sgds-mainnav>
</div>
<div class="sgds:flex sgds:flex-row">
<div class="sgds:sticky sgds:h-[calc(100vh-108px)] sgds:overflow-y-scroll sgds:top-27 sgds:w-68 sgds:border-r sgds:border-muted">
<!-- Sidebar navigation -->
</div>
<div class="sgds:flex sgds:flex-col sgds:w-full">
<div class="sgds-container-sidebar sgds:py-2-xl">
<!-- Page content -->
</div>
<sgds-footer></sgds-footer>
</div>
</div>For full layout details and responsive container breakpoints, see Application Shell.
components-*<link><head>themes/day.csscss/sgds.csscss/utility.csscss/utility.csssgds:import "@govtechsg/sgds-web-component".sgds-container.sgds-container-sidebarsgds:max-w-*