List of Case Types with Example in Lightning Web Component – Pascal, Camel, Kebab, Snake and Upper Case

While create Component Name, Controller Name, Variable Name, Class Name in Lightning Web Component we need to maintain the case types and below are the list of case types with Example.

Case Types Example Where to Use
Pascal Case SfdcLearnShare Its used to create a class name (ItemName)
Camel Case sfdcLearnShare Property names in Javascript are in camel Case (itemName)
Kebab Case sfdc-learn-share HTML attributes are in kebab case and Its used to LWC for component rendering, calling from one component to another component, set value attribute name to other component in LWC (item-name)
Snake Case sfdc_learn_share Its often used as a convention in declaring constants in many languages like C, C++, Java, PHP, Python Languages (item_name)
Upper Case (Snake Case) SFDC_LEARN_SHARE Its often used as a convention in declaring constants in many languages like C, C++, Java, PHP, Python Languages (ITEM_NAME)

Component Folder Structure while creating Lightning Web Component – https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.create_components_folder

JavaScript Property Names while creating Lightning Web Component – https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.js_props_names

Component JavaScript File Structure with Examples – https://developer.salesforce.com/docs/component-library/documentation/lwc/create_components_javascript

 

Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *

*