3

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.

1

2 Answers 2

4

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?

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

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).

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .