Create Hello World Lightning Component

Bynayakdillip

Create Hello World Lightning Component

Hello World Lightning Component

Step:-1: Login to Salesforce dev Org

https://login.salesforce.com/

Step:-2 Open Developer Console

Step:3 Create Lightning Component
File–>New–>Lightning Component

After Click on the lightning component, Enter Name and Description for the component.

Paste the below code over the component

<!--HelloWorldCMP-->
<aura:component >
	<p> Hello World </p>
</aura:component>

Also, you can add CSS on Click Style

CSS CODE

.THIS {
    width:100px;
    height:100px;
}

Step:-3 Create Lightning Application page For test the Lightning Componenet
File–>New–>Lightning Application

After click on the Lightning Application, Enter Name and Description for the page

Step:-4 Use your created Component over lightning application page

<aura:application >
	<c:HelloWorldCMP></c:HelloWorldCMP>
</aura:application>

Paste the below code

Step:-5 preview the page on click preview button

Output:-

About the author

nayakdillip administrator

Leave a Reply