Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
forcedotcom avatar

Applying Slds

  • 81 installs
  • 787 repo stars
  • Updated August 5, 2026
  • forcedotcom/afv-library

Provides validation checklists to author Salesforce Lightning Design System components using styling hooks correctly, avoiding hardcoded colors and deprecated tokens.

About

Supplies theming and styling validation checks (T-series) for SLDS-authored components covering styling hooks, surface pairing, spacing, fonts, and shadows. A developer uses it when building or finalizing SLDS components to ensure hook-based styling.

  • Requires SLDS styling hooks with fallbacks and correct surface/text pairing
  • Bans hardcoded colors, magic pixels, and deprecated --lwc-* tokens

Applying Slds by the numbers

  • 81 all-time installs (skills.sh)
  • Ranked #1,104 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/afv-library --skill applying-slds

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs81
repo stars787
Last updatedAugust 5, 2026
Repositoryforcedotcom/afv-library

What it does

Provides validation checklists to author Salesforce Lightning Design System components using styling hooks correctly, avoiding hardcoded colors and deprecated tokens.

Files

checklists.mdMarkdownGitHub ↗

Validation Checklists

Run through these checks before finalizing any SLDS-authored component. Check IDs align with the validating-slds skill's quality-checks.md.

Theming & Styling (T-series)

Code produced by this skill should score high on T-series checks.

CheckWhat to verifyAudit ID
Hook fallbacksEvery var(--slds-g-*) has a fallback valueT002
Surface pairingsurface-* bg paired with on-surface-* textT010
Container pairingsurface-container-* bg paired with on-surface-* textT011
Accent pairingaccent-* bg paired with on-accent-* textT012
Feedback pairingFeedback colors paired with correct text hooksT013
Spacing hooksSpacing uses var(--slds-g-spacing-*) or utility classesT020
No magic pixelsNo arbitrary px values for spacingT021
Font family hooksfont-family uses var(--slds-g-font-family-*)T030
Font size hooksfont-size uses var(--slds-g-font-scale-*) or var(--slds-g-font-size-base) -- NOT var(--slds-g-font-size-N)T031
Font weight hooksfont-weight uses var(--slds-g-font-weight-*)T032
Shadow hooksShadows use var(--slds-g-shadow-*)T040
Border radius hooksBorder radius uses var(--slds-g-radius-*)T041
Color hooks numberedEvery --slds-g-color-* hook ends in a number (no bare on-surface, on-accent, etc.)T050
No invented hooksEvery hook referenced actually exists in metadata/hooks-index.jsonT051
No hardcoded colorsNo hex, rgb, or named colors (linter also catches this)linter
No class overridesNo .slds-* class overrides (linter also catches this)linter
No deprecated tokensNo --lwc-* tokens (linter also catches this)linter

---

Code Quality (Q-series)

CheckWhat to verifyAudit ID
No !importantNo !important declarationsQ001
No inline stylesNo style="..." in HTMLQ002
Custom class prefixCustom classes use my-*, c-*, or namespace prefixQ010
No dynamic SLDS class manipulationAvoid .classList.add/remove/toggle('slds-*') patterns in JSQ012
No magic numbersAll numeric values have clear purposeQ020

---

Component Usage (C-series)

CheckWhat to verifyAudit ID
LBC inputs (LWC)Use <lightning-input> not <input>C001
LBC buttons (LWC)Use <lightning-button> not <button>C002
LBC icons (LWC)Use <lightning-icon> not custom SVGC003
Blueprint structureCards use slds-card, modals use slds-modal, etc.C010-C013

---

Accessibility Reminders (A-series)

Deep accessibility is owned by the accessibility skill. These are minimal reminders to nudge agents.

CheckWhat to verifyAudit ID
Icon alt textAll <lightning-icon> have alternative-text (empty string for decorative)A004
Image alt textAll <img> have alt attributeA005
Color not sole indicatorStatus uses icon or text too, not just colorA030
No outline:noneDon't remove focus outline without replacementA021

For full WCAG compliance, apply the accessibility skill after authoring.

---

Quick Validation Script

Run the SLDS linter to catch the most common issues automatically:

npx @salesforce-ux/slds-linter@latest lint .

The linter catches:

  • slds/class-override -- overriding SLDS classes
  • slds/lwc-token-to-slds-hook -- deprecated tokens
  • slds/no-hardcoded-values -- hardcoded colors/spacing

Everything above the linter line must be checked manually or by the auditing skill.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.