1

I'm trying to apply a specific variant to a lightning button. Lightning Design System says there is a button variation called outline-brand. It applies the slds-button_outline-brand class to the button.

However, the component documentation doesn't show that variant option available. I've tried something like this:

<lightning:button variant="outline-brand" label="Cancel" />                

Can this be done as a variant or do I need to use class instead?

0

2 Answers 2

1

The Lightning Component Library (LCL) tends to lag behind the Salesforce Lightning Design System (SLDS) by about one release on average; two different teams are working on these two parts of Salesforce, so it is strictly true that there must be some lag time between when a style is defined and when it makes it in to the LCL. For now, assuming the style is available (I haven't checked), you should be able to use it as a class in this release, and it will likely become a variant you can use in the next release (note: there's no guarantee of this, but it seems reasonable). The class version, of course, will always work in to the foreseeable future now that SLDS has stabilized its design patterns.

0

Try to change the variant name to "brand-outline"

<lightning:button variant="brand-outline" label="Cancel" />

You must log in to answer this question.

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