Activity Forums Salesforce® Discussions What is variant in Salesforce?

  • Anuj

    Member
    February 6, 2020 at 12:33 pm

    Hi Krati,

    Base component variants correspond to variants in Lightning Design System. Variants change the appearance of a component and are controlled by the variant attribute.
    If you pass in a variant that’s not supported, the default variant is used instead. This example creates a button with the base variant.

    For example.

    <lightning:button variant="base" label="Base" onclick="{! c.handleClick }"/>

  • Anjali

    Member
    February 6, 2020 at 2:32 pm

    Variants change the appearance of a component and are controlled by the variant attribute.

    Please go through the link- https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_base_variants.htm

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos