This might be a very silly question, but I wanted to make sure that I am not doing anything wrong.

I am using SLDS to design all my components and has been using js to add necessary classes to perform required action. For example, I had to add slds-is-open class to open a menu item etc.

Is that the right behaviour or the elements should automatically include required class, similar to bootstrap.


2 Answers 2


Your understanding is correct. LDS is a CSS library and we need to write JavaScript on top of it to add desired behavior. Bootstrap comes with JavaScript handlers and code as well(at places) but Lightning is just a CSS library.

This question in FAQ has the answer to what you are looking for: Is any JavaScript included as part of the framework?

  • I should I have read the SLDS FAQ's before posting here. Thanks anyways :) May 17, 2017 at 12:47

If you haven't checked lately, review the lightning: components listed in the Component Reference and use those where possible. They have the SLDS class handling JavaScript built in and so save you a lot of work.

This Base Components Roadmap suggests that most commonly used components will be available by the end of 2017 (subject to the usual Forward-Looking Statements caveat).

  • I am aware of these, but definitely we need more elements when building components. Thanks for the help. May 17, 2017 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.