设计与多媒体

design-systems-slds-apply

forcedotcom/sf-skills

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include "build a modal", "create a form", "data table", "SLDS styling", "style with hooks", "add an icon".

  • 6047 次安装
  • 1100 星标
  • 收录于

安装命令

npx skills add https://github.com/forcedotcom/sf-skills --skill design-systems-slds-apply

SKILL.md

Applying SLDS

The Salesforce Lightning Design System (SLDS) is a CSS framework with thousands of artifacts. This skill teaches agents how to find and correctly use them.

Version: This skill targets SLDS v2. Legacy --lwc-* tokens and slds-*--modifier syntax are deprecated.

Audit scope: The companion design-systems-slds-validate skill analyzer only scans .css, .html, and .js files. Use it directly for LWC and similar HTML/CSS/JS components; treat it as a partial signal for JSX/TSX or other framework-specific template formats and supplement with manual review.

What is SLDS?

Artifact Count Description
Lightning Base Components ~70 Pre-built LWC components (LWC only)
SLDS Blueprints 85 CSS/HTML patterns for any framework
Styling Hooks 523 CSS custom properties (--slds-g-*) for theming
Utility Classes 1,147 Rapid styling classes for spacing, layout, visibility
Icons 1,732 SVG icons across 5 categories