-1

I tried to use lightning:card in my Lightning Component which is not working properly

<aura:component>
    <lightning:card>
        <aura:set attribute="title">
            Hello!
        </aura:set>
        <aura:set attribute="footer">
            <lightning:badge label="footer"/>
        </aura:set>
        <aura:set attribute="actions">
            <lightning:button label="New"/>
        </aura:set>
        <p class="slds-p-horizontal_small">
            Card Body (custom component)
        </p>
    </lightning:card>
</aura:component>

Can anyone please let me know what is the issue

  • 3
    can you explain the behavior of "not working properly", maybe add a screenshot, so we can better understand and help – glls Nov 17 '17 at 14:30
1

You have to attach the component in inside a lightning page using app Builder or inside a lightning application using

<aura:application extends='force:slds'> tags.
  • Actually, the lightning:card took the full width of the window, so I am not able to identify its presence inside the lightning component. I tried it by reducing its width, now I can see it clearly. thanks for all replies – Kiruthika Nov 21 '17 at 12:29

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.