SlideShare a Scribd company logo
FREE WEEKLY LWC SESSION
TIMINGS Sunday
 8PM IST
 10:30AM EST
 7:30 AM PST
Agenda
Cascading Style Sheets (CSS)
Salesforce Lightning Design System(SLDS)
CSS and SLDS in LWC
 To style the LWC use Lightning Design System(SLDS) or CSS

SLDS CSS
Use to give your component the Lightning
experience look and feel
Use to modify styling our own way
It helps you build applications with the look
and feel of Lightning Experience without
writing a single line of CSS
It describes how HTML elements are to be
displayed on screen, paper, or in other media.
Style LWC Components with SLDS
 SLDS is a CSS framework that provide look and feel of Lightning experience
 It’s easy to spot the SLDS styles because they begin with SLDS
 Example : We will create a button with a “brand” design variation.
 Use the “variant” attribute to pick the design variations
Custom CSS
 To style a component, create a style sheet in the component bundle with the same
name as the component
LWC Component CSS File
MyComponent MyComponent.css
CSS in LWC
 Each component can have only one style sheet.
 A component’s style sheet can reach up and style its own
element
Demo
Agenda
 What is SVG
 Difference between SVG and JPEG/PNG
 Ways to Use SVG in LWC
What is SVG?
 Scalable Vector Graphics (SVG) is a web standard that allows you to
define two-dimensional vector graphics using an XML-based markup
language.
 Lightning Web Components (LWC) provide full built-in support for using
them Example
<svg baseProfile="full" width="300" height="200"
xmlns=http://www.w3.org/2000/svg>
<rect width = “100%” height =“100%” fill=“red”></rect>
</svg>
XML format
Why SVG is better?
Pixel SVG
Pixel-based images (also known as raster or bitmap
images
Scalable Vector Graphics (SVG)
Pixel define a color for each individual pixel of the
image.
SVG defines how to create scalable vector-based
graphics using XML code
They’re difficult to scale or change. SVGs are well suited for web development, as XML
plays nicely with HTML, JavaScript and CSS.
Some examples of pixel-based image formats are
JPEG, GIF, PNG, TIF, BMP or PSD.
Some vector-based image formats include AI, CDR or
SVG.
SVG images don’t lose quality when you scale them,
can be easily created and modified, and they don’t
require too much space on disk.
Pixel vs. vector-based
graphics
Pixel Image SVG vs Pixel(PNG)
Ways to use SVG
There are 3 ways to use SVG in LWC
 Use the SVG inside an HTML template
 Create a dedicated component for loading your
SVGs
 Store the SVG in a static resource

Agenda
 What is data binding
 One-Way Data Binding in LWC Vs Aura
 Two-Way Data Binding in LWC Vs Aura
 Track Decorator not used anymore
Data Binding
 Data binding is the synchronization of data between
business logic and view of the application. There are two
types of data-binding
 There are 2 types of Data Binding
 One-way Binding
 Two-way binding
One-way vs Two-way data Binding
One-Way data Binding in LWC Vs Aura
Two-way data Binding in LWC vs Aura
Track Decorator deprecated
 Earlier track decorator was used to make property
reactive but now all fields in a Lightning web
component class are reactive.
 If a field’s value changes, and the field is used in
a template, the component re-renders and
displays the new value so no need to use @track
Q&A
Thank you

More Related Content

What's hot

The Future of ASP.NET
The Future of ASP.NETThe Future of ASP.NET
Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
 Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
Amazon Web Services
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
Troy Miles
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
CodeOps Technologies LLP
 
Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...
CodeOps Technologies LLP
 
Codestrong 2012 breakout session building your own custom cloud services
Codestrong 2012 breakout session   building your own custom cloud servicesCodestrong 2012 breakout session   building your own custom cloud services
Codestrong 2012 breakout session building your own custom cloud services
Axway Appcelerator
 
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | EdurekaAngular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Edureka!
 
Static web apps by GitHub action
Static web apps by GitHub actionStatic web apps by GitHub action
Static web apps by GitHub action
Seven Peaks Speaks
 
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop
Michael Haberman
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sirwan Afifi
 
Integration Services Presentation
Integration Services PresentationIntegration Services Presentation
Integration Services Presentation
Catherine Eibner
 
Integration Services Presentation V2
Integration Services Presentation V2Integration Services Presentation V2
Integration Services Presentation V2
Catherine Eibner
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
Edureka!
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance
Bohdan Dovhań
 
AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...
Yun Zhi Lin
 
Mvc webforms
Mvc webformsMvc webforms
Mvc webforms
Muhammad Younis
 
Leading Edge of Modern Web Apps on Azure - Menaka - CCDays
Leading Edge of Modern Web Apps on Azure - Menaka - CCDaysLeading Edge of Modern Web Apps on Azure - Menaka - CCDays
Leading Edge of Modern Web Apps on Azure - Menaka - CCDays
CodeOps Technologies LLP
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CodeOps Technologies LLP
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
Mohamed Elkhodary
 

What's hot (20)

The Future of ASP.NET
The Future of ASP.NETThe Future of ASP.NET
The Future of ASP.NET
 
Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
 Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
Jumpstarting Your Cloud Journey with OSS on Amazon Lightsail
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 
Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...Building Deploying and Managing Microservices-based Applications with Azure P...
Building Deploying and Managing Microservices-based Applications with Azure P...
 
Codestrong 2012 breakout session building your own custom cloud services
Codestrong 2012 breakout session   building your own custom cloud servicesCodestrong 2012 breakout session   building your own custom cloud services
Codestrong 2012 breakout session building your own custom cloud services
 
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | EdurekaAngular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
 
Static web apps by GitHub action
Static web apps by GitHub actionStatic web apps by GitHub action
Static web apps by GitHub action
 
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Integration Services Presentation
Integration Services PresentationIntegration Services Presentation
Integration Services Presentation
 
Integration Services Presentation V2
Integration Services Presentation V2Integration Services Presentation V2
Integration Services Presentation V2
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
 
Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance Migrate To Lightning Web Components from Aura framework to increase performance
Migrate To Lightning Web Components from Aura framework to increase performance
 
AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...AWS Lambda Containers - bridging the gap between serverless and containers on...
AWS Lambda Containers - bridging the gap between serverless and containers on...
 
Mvc webforms
Mvc webformsMvc webforms
Mvc webforms
 
Leading Edge of Modern Web Apps on Azure - Menaka - CCDays
Leading Edge of Modern Web Apps on Azure - Menaka - CCDaysLeading Edge of Modern Web Apps on Azure - Menaka - CCDays
Leading Edge of Modern Web Apps on Azure - Menaka - CCDays
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
 

Similar to Styling and Data Binding in Lightning Web Component

CSS3: The Next Generation Of Style
CSS3: The Next Generation Of StyleCSS3: The Next Generation Of Style
CSS3: The Next Generation Of Style
jbellWCT
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
Gopi A
 
SVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsSVG - Scalable Vector Graphics
SVG - Scalable Vector Graphics
Shweta Sadawarte
 
Html5 Canvas Detail
Html5 Canvas DetailHtml5 Canvas Detail
Html5 Canvas Detail
Nisa Soomro
 
Responsive Web Design and SharePoint
Responsive Web Design and SharePointResponsive Web Design and SharePoint
Responsive Web Design and SharePoint
Stefan Bauer
 
Svghtml5 Meetup
Svghtml5 MeetupSvghtml5 Meetup
Svghtml5 Meetup
Oswald Campesato
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
Learn svg
Learn svgLearn svg
Learn svg
FitBlar Mit
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
Akila Iroshan
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
Oswald Campesato
 
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Nathaniel Bagnell
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes Back
Matt Baxter
 
Vector graphics
Vector graphicsVector graphics
Vector graphics
lenance
 
Client side performance compromises worth making
Client side performance compromises worth makingClient side performance compromises worth making
Client side performance compromises worth making
Cathy Lill
 
Introduction to analytics cloud salesforce saturday
Introduction to analytics cloud   salesforce saturdayIntroduction to analytics cloud   salesforce saturday
Introduction to analytics cloud salesforce saturday
Madan Khichi
 
Introduction to Analytics Cloud
Introduction to Analytics CloudIntroduction to Analytics Cloud
Introduction to Analytics Cloud
Mohith Shrivastava
 
D3 Basic Tutorial
D3 Basic TutorialD3 Basic Tutorial
D3 Basic Tutorial
Tao Jiang
 
Ordina SOFTC Presentation - Visual Studio LightSwitch
Ordina SOFTC Presentation - Visual Studio LightSwitchOrdina SOFTC Presentation - Visual Studio LightSwitch
Ordina SOFTC Presentation - Visual Studio LightSwitch
Ordina Belgium
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdf
RonDosh
 

Similar to Styling and Data Binding in Lightning Web Component (20)

CSS3: The Next Generation Of Style
CSS3: The Next Generation Of StyleCSS3: The Next Generation Of Style
CSS3: The Next Generation Of Style
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
SVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsSVG - Scalable Vector Graphics
SVG - Scalable Vector Graphics
 
Html5 Canvas Detail
Html5 Canvas DetailHtml5 Canvas Detail
Html5 Canvas Detail
 
Responsive Web Design and SharePoint
Responsive Web Design and SharePointResponsive Web Design and SharePoint
Responsive Web Design and SharePoint
 
Svghtml5 Meetup
Svghtml5 MeetupSvghtml5 Meetup
Svghtml5 Meetup
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Learn svg
Learn svgLearn svg
Learn svg
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
 
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes Back
 
Vector graphics
Vector graphicsVector graphics
Vector graphics
 
Client side performance compromises worth making
Client side performance compromises worth makingClient side performance compromises worth making
Client side performance compromises worth making
 
Introduction to analytics cloud salesforce saturday
Introduction to analytics cloud   salesforce saturdayIntroduction to analytics cloud   salesforce saturday
Introduction to analytics cloud salesforce saturday
 
Introduction to Analytics Cloud
Introduction to Analytics CloudIntroduction to Analytics Cloud
Introduction to Analytics Cloud
 
D3 Basic Tutorial
D3 Basic TutorialD3 Basic Tutorial
D3 Basic Tutorial
 
Ordina SOFTC Presentation - Visual Studio LightSwitch
Ordina SOFTC Presentation - Visual Studio LightSwitchOrdina SOFTC Presentation - Visual Studio LightSwitch
Ordina SOFTC Presentation - Visual Studio LightSwitch
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdf
 

More from SmritiSharan1

Conditional Rendering and rendering list in LWC
Conditional Rendering and rendering list in LWCConditional Rendering and rendering list in LWC
Conditional Rendering and rendering list in LWC
SmritiSharan1
 
Salesforce DX for Scratch Orgs
Salesforce DX for  Scratch OrgsSalesforce DX for  Scratch Orgs
Salesforce DX for Scratch Orgs
SmritiSharan1
 
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch OrgsChapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
SmritiSharan1
 
Introduction to Lightning Web Component
Introduction to Lightning Web Component Introduction to Lightning Web Component
Introduction to Lightning Web Component
SmritiSharan1
 
Session 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCESession 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCE
SmritiSharan1
 
Introduction to lightning lifecycle
Introduction to lightning lifecycle Introduction to lightning lifecycle
Introduction to lightning lifecycle
SmritiSharan1
 

More from SmritiSharan1 (6)

Conditional Rendering and rendering list in LWC
Conditional Rendering and rendering list in LWCConditional Rendering and rendering list in LWC
Conditional Rendering and rendering list in LWC
 
Salesforce DX for Scratch Orgs
Salesforce DX for  Scratch OrgsSalesforce DX for  Scratch Orgs
Salesforce DX for Scratch Orgs
 
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch OrgsChapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
Chapter 3 : Setup SalesforceDX (SFDX) for Non Scratch Orgs
 
Introduction to Lightning Web Component
Introduction to Lightning Web Component Introduction to Lightning Web Component
Introduction to Lightning Web Component
 
Session 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCESession 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCE
 
Introduction to lightning lifecycle
Introduction to lightning lifecycle Introduction to lightning lifecycle
Introduction to lightning lifecycle
 

Recently uploaded

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 

Styling and Data Binding in Lightning Web Component

  • 1.
  • 2.
  • 3. FREE WEEKLY LWC SESSION TIMINGS Sunday  8PM IST  10:30AM EST  7:30 AM PST
  • 4.
  • 5. Agenda Cascading Style Sheets (CSS) Salesforce Lightning Design System(SLDS)
  • 6. CSS and SLDS in LWC  To style the LWC use Lightning Design System(SLDS) or CSS  SLDS CSS Use to give your component the Lightning experience look and feel Use to modify styling our own way It helps you build applications with the look and feel of Lightning Experience without writing a single line of CSS It describes how HTML elements are to be displayed on screen, paper, or in other media.
  • 7. Style LWC Components with SLDS  SLDS is a CSS framework that provide look and feel of Lightning experience  It’s easy to spot the SLDS styles because they begin with SLDS  Example : We will create a button with a “brand” design variation.  Use the “variant” attribute to pick the design variations
  • 8. Custom CSS  To style a component, create a style sheet in the component bundle with the same name as the component LWC Component CSS File MyComponent MyComponent.css
  • 9. CSS in LWC  Each component can have only one style sheet.  A component’s style sheet can reach up and style its own element Demo
  • 10.
  • 11. Agenda  What is SVG  Difference between SVG and JPEG/PNG  Ways to Use SVG in LWC
  • 12. What is SVG?  Scalable Vector Graphics (SVG) is a web standard that allows you to define two-dimensional vector graphics using an XML-based markup language.  Lightning Web Components (LWC) provide full built-in support for using them Example <svg baseProfile="full" width="300" height="200" xmlns=http://www.w3.org/2000/svg> <rect width = “100%” height =“100%” fill=“red”></rect> </svg> XML format
  • 13. Why SVG is better? Pixel SVG Pixel-based images (also known as raster or bitmap images Scalable Vector Graphics (SVG) Pixel define a color for each individual pixel of the image. SVG defines how to create scalable vector-based graphics using XML code They’re difficult to scale or change. SVGs are well suited for web development, as XML plays nicely with HTML, JavaScript and CSS. Some examples of pixel-based image formats are JPEG, GIF, PNG, TIF, BMP or PSD. Some vector-based image formats include AI, CDR or SVG. SVG images don’t lose quality when you scale them, can be easily created and modified, and they don’t require too much space on disk.
  • 14. Pixel vs. vector-based graphics Pixel Image SVG vs Pixel(PNG)
  • 15. Ways to use SVG There are 3 ways to use SVG in LWC  Use the SVG inside an HTML template  Create a dedicated component for loading your SVGs  Store the SVG in a static resource 
  • 16.
  • 17. Agenda  What is data binding  One-Way Data Binding in LWC Vs Aura  Two-Way Data Binding in LWC Vs Aura  Track Decorator not used anymore
  • 18. Data Binding  Data binding is the synchronization of data between business logic and view of the application. There are two types of data-binding  There are 2 types of Data Binding  One-way Binding  Two-way binding
  • 19. One-way vs Two-way data Binding
  • 20. One-Way data Binding in LWC Vs Aura
  • 21.
  • 22. Two-way data Binding in LWC vs Aura
  • 23. Track Decorator deprecated  Earlier track decorator was used to make property reactive but now all fields in a Lightning web component class are reactive.  If a field’s value changes, and the field is used in a template, the component re-renders and displays the new value so no need to use @track
  • 24. Q&A