sgds-components-divider

Use the sgds-divider web component to render horizontal or vertical separator lines between content sections. Apply this skill whenever a user asks about dividers, separators, ruled lines, horizontal rules, vertical dividers, or divider thickness in SGDS.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "sgds-components-divider" with this command: npx skills add govtechsg/sgds-web-component/govtechsg-sgds-web-component-sgds-components-divider

SGDS Divider Component Skill

<sgds-divider> renders a separator line to visually group or divide adjacent content. Use it instead of a native <hr> whenever SGDS consistent styling is needed.

Prerequisites

See sgds-components-setup for installation and framework integration (React 19+ vs React ≤18, Vue, Angular).

No CSS styling modifications — custom properties and CSS parts are not exposed on this component.

Quick Decision Guide

Which orientation?

  • Separates stacked rows of content → horizontal (default)
  • Separates side-by-side columns → vertical

Vertical dividers require an explicit height on the parent container. Without one, a vertical divider collapses to zero height.

Which thickness?

  • Subtle separator → thin (default)
  • Moderate emphasis → thick
  • Strong emphasis → thicker
<!-- Default horizontal divider -->
<sgds-divider></sgds-divider>

<!-- Thicker horizontal divider -->
<sgds-divider thickness="thicker"></sgds-divider>

<!-- Vertical divider — parent must have an explicit height -->
<div style="display: flex; height: 100px;">
  <sgds-divider orientation="vertical"></sgds-divider>
</div>

<!-- Vertical with thickness -->
<div style="display: flex; height: 100px;">
  <sgds-divider orientation="vertical" thickness="thick"></sgds-divider>
</div>

API Summary

AttributeTypeDefaultPurpose
orientationhorizontal | verticalhorizontalDirection of the separator line
thicknessthin | thick | thickerthinVisual weight of the line

Slots

None.

Events

None.


For AI agents:

  1. Always use <sgds-divider> for separator lines — do not suggest raw <hr> elements or border utilities.
  2. Vertical dividers require a flex or grid parent with an explicit height; warn users when they request orientation="vertical" without mentioning a container height.
  3. role="separator" and aria-orientation are set automatically — never add them manually.
  4. There are no slots, events, or public methods on this component.
  5. When dividing columns, use orientation="vertical"; when dividing rows, use the default orientation="horizontal".

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

sgds-components-checkbox

No summary provided by upstream source.

Repository SourceNeeds Review
General

storybook-stories

No summary provided by upstream source.

Repository SourceNeeds Review