skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
govtechsg/sgds-web-component270 installs

sgds-components

Complete reference for all SGDS web components including installation. Use when users ask about any <sgds-*> component — accordion, alert, badge, breadcrumb, button, card, checkbox, close-button, combo-box, data-table, datepicker, description-list, divider, drawer, dropdown, file-upload, footer, icon, icon-button, icon-card, icon-list, image-card, input, link, mainnav, masthead, modal, overflow-menu, pagination, progress-bar, quantity-toggle, radio, select, sidebar, sidenav, skeleton, spinner, stepper, subnav, switch, system-banner, tab, table, table-of-contents, textarea, thumbnail-card, toast, or tooltip. For framework integration (React, Next.js, Vue, Angular), see sgds-getting-started.

How do I install this agent skill?

npx skills add https://github.com/govtechsg/sgds-web-component --skill sgds-components
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is a comprehensive documentation reference for the Singapore Design System (SGDS) web components. It provides installation guides, component usage, and API references. No security issues were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

SGDS Components Setup Skill

Prerequisites and framework integration for using <sgds-*> web components.

Installation

npm install @govtechsg/sgds-web-component
# or
pnpm add @govtechsg/sgds-web-component

Import the library once at your app entry point:

import "@govtechsg/sgds-web-component";

Framework Integration

For React, Next.js, Vue, and Angular integration, see sgds-getting-started Step 3.


Troubleshooting Component Behaviour

When a component behaves unexpectedly — wrong event fired, property not reflected, slot not rendering — read the compiled source directly. It contains full method bodies, event logic, internal defaults, and edge-case handling that no documentation captures.

Read from node_modules/@govtechsg/sgds-web-component — this directory is present once the package is installed:

node_modules/@govtechsg/sgds-web-component/components/Accordion/sgds-accordion.js
node_modules/@govtechsg/sgds-web-component/components/Accordion/sgds-accordion-item.js
node_modules/@govtechsg/sgds-web-component/components/Accordion/sgds-accordion.d.ts

Replace Accordion/sgds-accordion with the relevant component folder and file name. The .js file contains the full implementation; the .d.ts file lists all properties, types, events, slots, and JSDoc descriptions.

If node_modules is absent — the package has not been installed. Ask the user to run their normal install step (npm install / pnpm install) before inspecting source files.


For AI agents: For framework-specific setup (React, Next.js, Vue, Angular), see the reference files in sgds-getting-started.

When a user reports unexpected component behaviour (wrong event, property not reflecting, slot not rendering), direct them to read the compiled source before trying anything else — see the Troubleshooting Component Behaviour section above.

Global rule — never set explicit widths on SGDS components. Do not add width, style="width: ...", or fixed-width utility classes (e.g. sgds:w-40) directly on any <sgds-*> element. Width is controlled by the parent layout — use flex, grid, or wrapper divs to constrain it. The only exception is when a user explicitly requests a fixed width.


Available Components

CategoryComponentReference
ActionsButton→ reference/button.md
ActionsIcon Button→ reference/icon-button.md
ActionsClose Button→ reference/close-button.md
ActionsLink→ reference/link.md
ActionsDropdown→ reference/dropdown.md
ActionsOverflow Menu→ reference/overflow-menu.md
NavigationMasthead→ reference/masthead.md
NavigationMain Nav→ reference/mainnav.md
NavigationFooter→ reference/footer.md
NavigationBreadcrumb→ reference/breadcrumb.md
NavigationPagination→ reference/pagination.md
NavigationSidenav→ reference/sidenav.md
NavigationSidebar→ reference/sidebar.md
NavigationSubnav→ reference/subnav.md
NavigationTab→ reference/tab.md
NavigationTable of Contents→ reference/table-of-contents.md
LayoutAccordion→ reference/accordion.md
LayoutDivider→ reference/divider.md
LayoutDrawer→ reference/drawer.md
LayoutModal→ reference/modal.md
ContentBadge→ reference/badge.md
ContentCard→ reference/card.md
ContentIcon Card→ reference/icon-card.md
ContentImage Card→ reference/image-card.md
ContentThumbnail Card→ reference/thumbnail-card.md
ContentDescription List→ reference/description-list.md
ContentData Table→ reference/data-table.md
ContentIcon→ reference/icon.md
ContentIcon List→ reference/icon-list.md
ContentTable→ reference/table.md
ContentTooltip→ reference/tooltip.md
FormsInput→ reference/input.md
FormsTextarea→ reference/textarea.md
FormsSelect→ reference/select.md
FormsCheckbox→ reference/checkbox.md
FormsRadio→ reference/radio.md
FormsCombo Box→ reference/combo-box.md
FormsDatepicker→ reference/datepicker.md
FormsFile Upload→ reference/file-upload.md
FormsQuantity Toggle→ reference/quantity-toggle.md
FeedbackSwitch→ reference/switch.md
WorkflowStepper→ reference/stepper.md

Form Input Components

When building forms, use these 9 form input components to capture user data:

  1. <sgds-input> — text fields
  2. <sgds-textarea> — multi-line text
  3. <sgds-select> — dropdown selection
  4. <sgds-checkbox> / <sgds-checkbox-group> — multiple choice
  5. <sgds-radio> / <sgds-radio-group> — single choice
  6. <sgds-combo-box> — searchable select
  7. <sgds-datepicker> — date input
  8. <sgds-file-upload> — file picker
  9. <sgds-quantity-toggle> — numeric counter

DO NOT use in forms (these are feedback/state, not input):

  • <sgds-switch> — This is a feedback component (displays toggle state), not a form input. Use <sgds-checkbox> or <sgds-radio-group> to collect user choice instead.
  • Other non-input components (Alert, Badge, Button, Card, etc.) — These are layout/feedback, not form controls.

For form layout patterns (field pairing, spacing, width constraints, multi-step forms with <sgds-stepper>, header hierarchy), see the sgds-blocks form layout skill. | Feedback | Alert | → reference/alert.md | | Feedback | Spinner | → reference/spinner.md | | Feedback | Skeleton | → reference/skeleton.md | | Feedback | Progress Bar | → reference/progress-bar.md | | Feedback | Toast | → reference/toast.md | | Feedback | System Banner | → reference/system-banner.md |

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/govtechsg/sgds-web-component/sgds-components">View sgds-components on skillZs</a>