uplifting-components-to-slds2

uplifting-components-to-slds2

Popular

Migrate Lightning Web Components from SLDS 1 to SLDS 2 by running the SLDS linter and fixing violations. Use this skill whenever users mention SLDS 2, SLDS uplift, linter violations, LWC token migration, class overrides, hardcoded CSS values that need SLDS hook replacement, or styling hook selection. Covers all styling hook categories — color, spacing, sizing, typography, borders, radius, and shadows. Also use when users mention no-hardcoded-values, no-slds-class-overrides, lwc-to-slds-hooks, no-deprecated-tokens-slds1, or ask about SLDS component migration — even if they don't explicitly say \"uplift\" or \"migration\".

788stars
286forks
Updated 8/5/2026
SKILL.md
readonlyread-only
name
uplifting-components-to-slds2
description

Migrate Lightning Web Components from SLDS 1 to SLDS 2 by running the SLDS linter and fixing violations. Use this skill whenever users mention SLDS 2, SLDS uplift, linter violations, LWC token migration, class overrides, hardcoded CSS values that need SLDS hook replacement, or styling hook selection. Covers all styling hook categories — color, spacing, sizing, typography, borders, radius, and shadows. Also use when users mention no-hardcoded-values, no-slds-class-overrides, lwc-to-slds-hooks, no-deprecated-tokens-slds1, or ask about SLDS component migration — even if they don't explicitly say \"uplift\" or \"migration\".

Goal

Systematically migrate Lightning Web Components from SLDS 1 to SLDS 2 using the SLDS linter and structured guidance for fixing violations across all styling hook categories.

SLDS 2 Styling Hook Categories

Category
Hook Prefix
What It Replaces

Color
--slds-g-color-*
Hardcoded colors, --lwc-color* tokens

Spacing
--slds-g-spacing-*
Hardcoded margins, padding, gaps

Sizing
--slds-g-sizing-*
Hardcoded widths, heights, dimensions

Typography
--slds-g-font-*
Hardcoded font sizes, weights, line heights

Border/Radius
--slds-g-radius-border-*, --slds-g-sizing-border-*
Hardcoded border-radius, border-width

Shadow
--slds-g-shadow-*
Hardcoded box-shadow values

Color hooks require the most judgment (context-dependent selection). Non-color hooks are mostly numbered scales with straightforward mappings.

Prerequisites