1

SLDS (Salesforce Lightning Design System) buttons have several styling options options including the brand (blue) option. From a cursory look at Lightning Experience, the "Save" button is normally styled that way.

But what does the term "brand" mean and what would be a general principle to apply for when to use slds-button--brand versus for example slds-button--neutral?

2 Answers 2

2

It's called that way because it respects branding values. If you were to change your brand's ActionColor, then anything styled with --brand would ideally get updated.

To answer your question about when to use which, I guess it depends if you're building a product other people will consume and eventually might want to brand. In that case, use --neutral to denote items which should always be the same regardless of branding.

Note: I'm not sure how much branding configuration is fully implemented across the board for example in Lightning App Builder, but that's the intent at least.

1
  • Thanks. IMHO Bootstrap's terms "primary" and "default" are a clearer approach...
    – Keith C
    Dec 3, 2016 at 10:43
1

For me, brand and neutral have to be with the styling/UI only. It depends on you which one you want to use.

But it's better to use brand for pertinent actions on your page [like Save, Edit, Create]. Being blue, one would spot the brand button faster than the neutral button. It could mean main/key action on the page.

Whereas neutral can be used for less 'important' (not the right word maybe, but you understand) like 'Cancel' / 'Close' etc.

1
  • Thanks for answering; that is pretty much what I'm assuming.
    – Keith C
    Dec 3, 2016 at 10:42

You must log in to answer this question.

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