Welcome to the Salesforce Lightning Design System (SLDS)
By Tom Bassett
September 07, 2022
SLDS stands for Salesforce Lightning Design System. In short, this is a set of standard design patterns to style your custom components in a uniform way that’s consistent with the rest of Salesforce.
5. Interaction Guidelines ensure that those with accessibility needs are not forgotten, and you can test navigating the system with just a keyboard, versus a keyboard and a mouse.
Where Can You Use the SLDS?
Although this is a Salesforce framework (or set of principles), this can be used inside and outside the Salesforce platform.
You can use SLDS in Lightning Components to ensure a standard look and feel when compared to the standard UI. The SLDS can be used in both Aura and Lightning Web Components, however, be sure of the differences noted here.
Within Visualforce you introduce the <apex:slds /> tag to get started and make your Visualforce pages pop with the latest Salesforce Lightning look and feel.
Using Lightning Out (beta), you can introduce the SLDS look and feel to other web apps outside of Salesforce such as Heroku or SharePoint.
Example from Figma of a Custom Component to Apply for a Role that could be exposed outside of Salesforce
How Can You Use the SLDS?
This very much depends on the type of component you are building, e.g. Lightning Web Component, Aura Component, or Visualforce, etc.
To get started, head to the vast documentation provided by Salesforce on how to use the Lightning Design system.
The documentation from Salesforce will detail the five layers of the SLDS and provide examples of how to apply to each different solution.
Something to bear in mind here is that when developing Lightning Components, this uses a JavaScript-type skill set so is best suited to those with experience, as it is targeted as a developer skill set.
Tools to Help
There are tools out there (like Figma, Sketch, or Framer) that can use the SLDS to provide wireframes, so when you are designing a solution, you can get an idea of the actual end user experience. They also work collaboratively with stakeholders to ensure the UI is the best possible and that all states of buttons (active, inactive) are considered.
Example from Figma of a Custom Component to Upload Contacts from .csv
Salesforce provides some tools of their own to help you develop your own components, including:
SLDS Validator: An add-on for Visual Studio Code to offer suggestions on how to use SLDS in a better way.
As a Solution Architect/User Experience (UX) Designer, I’d always opt to use the SLDS when designing a custom interface. This is because it will provide me with the framework for common buttons and layouts that users are using elsewhere – which saves them from building custom functionality for the same.
It’s no surprise that Salesforce is putting the onus on the Salesforce Lightning Design System with this appearing in different exams including JavaScript Developer I and User Experience (UX) Designer. After all, the future is lightning!
30x Trailhead Certified, 11x Accredited Professional, 2x Slack Certified with 6+ years experience. Passionate about helping other Trailblazers as a Forum Ambassador, Salesforce Ben Expert Author, FlowFest Judge/Speaker, Co-Leader of the London Architect Community Group, Podcast Host, Dreamforce Speaker and Community Speaker. Based in London working as a Solution Architect.