Skip to content

Repository files navigation

GCDS Extension Components

A collection of reusable web components that extend the Government of Canada Design System (GCDS) with additional functionality for Canada.ca managed web services.

Built with Stencil, the library produces framework-agnostic Web Components that can be used in static sites, CMS platforms, and modern JavaScript frameworks.

Features

  • Framework-agnostic Web Components
  • Built with Stencil
  • Shadow DOM encapsulation
  • TypeScript support
  • Accessibility-first development
  • Automated component documentation
  • Eleventy-powered documentation site
  • Bilingual documentation support (English and French)
  • Compatible with GCDS components

Getting Started

Prerequisites

  • Node.js 22 or later
  • npm 10 or later

Installation

Clone the repository:

git clone https://github.com/ServiceCanada/gcds-ext-canada.git
cd gcds-ext-canada

Install dependencies:

npm install

Development

Start the component library and documentation site in watch mode:

npm start

This command:

  • Rebuilds Stencil components when source files change
  • Regenerates documentation pages
  • Serves the Eleventy documentation site locally

Build

Build the component library:

npm run build

Generate Documentation

Build the component library and documentation site:

npm run docs:build

Serve Documentation

Build and launch the documentation site locally:

npm run docs:serve

Documentation

Documentation is generated using Eleventy and includes:

  • Component overview
  • Live examples
  • Usage guidance
  • Properties
  • Events
  • Slots
  • Accessibility considerations
  • Source code examples

Component API metadata is generated directly from the Stencil source to ensure documentation remains synchronized with implementation.

Using Components

After building the project, load the generated component bundle:

<script type="module" src="/build/gcds-ext-mws.esm.js"></script>

Accessibility

Accessibility is a core requirement for all components.

Components are designed to:

  • Support keyboard navigation
  • Provide appropriate ARIA semantics
  • Work with assistive technologies
  • Follow WCAG guidance where applicable
  • Align with Government of Canada accessibility requirements

Contributing

Contributions are welcome.

Before submitting a pull request:

  1. Create or update documentation.
  2. Add or update tests.
  3. Verify accessibility requirements.
  4. Ensure all builds and tests pass.

Related Resources

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages