Installing SGDS
Install directly in browsers using a free and highly available CDN:
CSS
JavaScript
Certain components of SGDS make use of JavaScript, with jQuery as an external dependency. If you only need the visual parts of SGDS (i.e. css), you do not need to import the following.
Install using npm
Frontend developers can use npm to download sgds and use it as a dependency in their projects. Using npm is especially useful when using a module bundler or build tool, such as Webpack.
- Install Node.js, which includes an installation of npm.
-
Install sgds by navigating to your site's codebase folder using
your terminal and run:
npm install sgds-govtech
-
This will download sgds into
node_modules/@govtechsg/sgds
in your current folder:* SGDS Sass source files, for advanced usage. - If you use a module bundler like Webpack, import sgds in your entry point: *Note that usage with frameworks such as React, Vue or Angular is discouraged since they manipulate the DOM in their own environments. Framework-specific implementations are in early development and can be found at sgds-govtech-react and sgds-govtech-vue .
Install manually
You can download minified sgds CSS and JavaScript files and host them yourself in your production environment.
Download SGDS packageThe zip package contains the following files:
- Extract and copy the files and folders into a relevant place in your project’s code base
- Reference the CSS and JavaScript files in each HTML page or templates in your project, same as above. Note that certain components of SGDS make use of JavaScript, with jQuery as an external dependency.
css/sgds.css
js/sgds.js
fonts/sgds-icons.svg
fonts/sgds-icons.wott
fonts/sgds-icons.ttf
sgds/sass/...
(source files for advanced usage)
Open source
The SGDS source is written in Sass and JavaScript. Usage and development instructions can be found at https://github.com/govtechsg/sgds. Bug reports and pull requests are also welcome!
Content Management Systems
Install Sitefinity Resource Package
All you have to do is copy the
Sitefinity resource package folder and paste into your
ProjectName / ResourcePackage
folder and rebuild the
project.
The Sitefinity DesignSystem resource package consist of:
-
SGDS Stylesheet
/DesignSystem/assets/dist/css/sgds.css
-
SGDS Javascript
/DesignSystem/assets/dist/js/sgds.js
-
SGDS Icon Library
/DesignSystem/assets/dist/fonts/
-
SGDS Grid System Template
/DesignSystem/GridSystem/Templates
-
Section template
sgds-section.html
-
Container template
sgds-container.html
-
Grid Columns
sgds-grid-x.html
-
Section template
-
Master layout with the
DSS compliant Mandatory components
/DesignSystem/MVC/Views/Layouts
- Gov.sg masthead
-
Navigation bar widget
/DesignSystem/MVC/Views/Navigation/NavigationView.sgds.cshtml
- Footer
Install Wordpress
Adding the Wordpress theme to your project:
- Log in to the WordPress Administration Panels.
- Select the Appearance panel, then Themes.
- Use the Upload link in the top links row to upload the Wordpress theme that you have previously downloaded to your machine.
- To activate the Theme click the Activate button.