What are Lightning Design System (SLDS) design tokens and why are they important?
Suggested answer
Design tokens are named, platform-agnostic variables that store visual design decisions — colours, font sizes, spacing, border radii, and shadow values. In SLDS, tokens follow the naming convention --slds-c-[component]-[property]-[variant] or the global --sds-g-[property] format. Examples: --slds-g-color-brand-base-50 (brand blue), --slds-g-font-size-3 (body font size). They are important because:
1. They enforce visual consistency across all Salesforce components.
2. They enable theming — changing one token updates every component using it.
3. They decouple design decisions from implementation, allowing designers and developers to communicate in shared language.
4. Custom components using tokens automatically inherit theme changes made in the Lightning Theme Builder, ensuring brand alignment across custom and standard elements.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.