Build your first Lightning Component — Only View

Santanu Pal
Sep 2, 2018 · 1 min read

How to build your first Lightning Component?
Only View, No Logic

Step 1: Create Lightning Component Bundle named “Welcome”
After creation, we will get four primary files such as

  • Welcome.cmp
  • Welcome.css
  • WelcomeController.js
  • WelcomeHelper.js

We need to update Welcome.cmp & Welcome.css file for now.

Welcome.cmp | Describes View Layout

Welcome.css | Describes Styling

Step 2: Create Lightning App named “LearningLightning”

LearningLightning.app | To run this newly created Lightning Component

You can notice that we are using the tag extends= “force:slds” to run the Lightning Application using Lightning Styles.

Step 3: Result

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade