Salesforce Decode
Salesforcedecode
Back to questions
LWCBeginnersldsbase-componentsui

What is SLDS and why use lightning-base components?

Real World Scenario

A developer builds custom HTML buttons that look wrong on Salesforce mobile. You point them to base components.

Expected Answer

• SLDS is Salesforce Lightning Design System—spacing, typography, and component styling standards • lightning-button, lightning-input, lightning-datatable match Salesforce look and accessibility • Base components handle keyboard nav and ARIA better than raw HTML in most cases • Custom CSS should complement SLDS tokens, not fight platform styles • Consistent UI reduces maintenance when Salesforce updates themes

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Discouraged on core Salesforce pages—conflicts with SLDS and locker. Stick to SLDS and lightning-* components.

Architect Perspective

Use platform components until they truly cannot meet requirement—pragmatic junior answer.