lwc
Lightning Web Components (LWC)
Last updated 10 days ago by diervo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lwc 
SYNC missed versions from official npm registry.

Lightning Web Components (LWC) is an enterprise-grade web components foundation for building user interfaces. LWC provides a simple authoring format for UI Components. LWC compiles this authoring format into low-level Web Component APIs. The lwc package is the main entry point for dependencies.

  • Develop components quickly and declaratively using HTML, JavaScript, and CSS.
  • Develop accessible components so that everyone can understand and navigate your app.
  • Components are encapsulated in all browsers via the @lwc/synthetic-shadow package, which polyfills the Shadow DOM.

Developing a Lightning web component is this easy.

counter
  ├──counter.css
  ├──counter.html
  └──counter.js
<!-- counter.html -->
<template>
    <p>Counter: {count}</p>
    <button onclick="{increaseCounter}">Add</button>
</template>
/* counter.css */
p {
    font-family: serif;
    font-size: large;
}
// counter.js
import { LightningElement } from 'lwc';

export default class Counter extends LightningElement {
    count = 0;

    increaseCounter() {
        this.count += 1;
    }
}

Supported Browsers

Browser Version
Microsoft® Internet Explorer® IE 11*
Microsoft® Edge Latest
Google Chrome™ Latest
Mozilla® Firefox® Latest
Apple® Safari® 12.x+

For IE 11, LWC uses compatibility mode. Code is transpiled down to ES5 and the required polyfills are added. To develop components that run in IE 11, follow the compatibility mode linting rules.

Docs, Recipes, & Support

lwc.dev has all the information you need to develop components using LWC, including code recipes and code playgrounds.

Get started fast using the create-lwc-app tool.

npx create-lwc-app my-app
cd my-app
npm run watch

For support, use the lwc tag on Stack Overflow or the lightning-web-components tag on Salesforce Stack Exchange.

Release Notes

Changes are documented at github.com/salesforce/lwc/releases.

Current Tags

  • 1.7.15-alpha3                                ...           canary (a month ago)
  • 1.8.6                                ...           latest (10 days ago)
  • 1.8.6-alpha.0                                ...           next (10 days ago)
  • 1.1.13-224.8                                ...           spring20 (9 months ago)
  • 1.3.7-226.7                                ...           summer20 (3 months ago)
  • 1.7.10-228.5                                ...           winter21 (a month ago)

299 Versions

  • 1.8.6-alpha.0                                ...           10 days ago
  • 1.8.6                                ...           10 days ago
  • 1.8.5                                ...           13 days ago
  • 1.8.4                                ...           21 days ago
  • 1.7.10-228.5                                ...           a month ago
  • 1.7.10-228.4                                ...           a month ago
  • 1.8.3                                ...           a month ago
  • 1.7.10-228.3                                ...           a month ago
  • 1.7.10-228.2                                ...           a month ago
  • 1.8.2                                ...           a month ago
  • 1.8.1                                ...           a month ago
  • 1.8.0                                ...           a month ago
  • 1.7.15-alpha3                                ...           a month ago
  • 1.7.15-alpha2                                ...           a month ago
  • 1.7.15-alpha1                                ...           a month ago
  • 1.7.14-alpha4                                ...           2 months ago
  • 1.7.14-alpha3                                ...           2 months ago
  • 1.7.14-alpha2                                ...           2 months ago
  • 1.7.14                                ...           2 months ago
  • 1.7.14-alpha1                                ...           2 months ago
  • 1.7.13                                ...           2 months ago
  • 1.7.13-alpha1                                ...           2 months ago
  • 1.7.12                                ...           2 months ago
  • 1.7.11                                ...           2 months ago
  • 1.7.11-locker-alpha1                                ...           2 months ago
  • 1.7.10-228.1                                ...           3 months ago
  • 1.7.10                                ...           3 months ago
  • 1.3.7-226.7                                ...           3 months ago
  • 1.7.9                                ...           3 months ago
  • 1.7.9-alpha2                                ...           3 months ago
  • 1.7.9-alpha1                                ...           3 months ago
  • 1.7.8                                ...           3 months ago
  • 1.7.7                                ...           3 months ago
  • 1.7.6                                ...           3 months ago
  • 1.7.5                                ...           4 months ago
  • 1.7.5-alpha1                                ...           4 months ago
  • 1.7.4                                ...           4 months ago
  • 1.7.3-lockerpreview-alpha1                                ...           4 months ago
  • 1.7.3                                ...           4 months ago
  • 1.7.3-alpha4                                ...           4 months ago
  • 1.7.3-alpha1                                ...           4 months ago
  • 1.7.2                                ...           4 months ago
  • 1.3.7-226.6                                ...           4 months ago
  • 1.3.7-226.5                                ...           4 months ago
  • 1.7.1                                ...           4 months ago
  • 1.7.0                                ...           5 months ago
  • 1.6.9                                ...           5 months ago
  • 1.6.9-alpha1                                ...           5 months ago
  • 1.7.0-alpha1                                ...           5 months ago
  • 1.6.8                                ...           5 months ago
  • 1.6.7                                ...           5 months ago
  • 1.6.7-alpha1                                ...           5 months ago
  • 1.6.6                                ...           5 months ago
  • 1.6.6-alpha1                                ...           5 months ago
  • 1.6.5                                ...           5 months ago
  • 1.6.4                                ...           5 months ago
  • 1.16.4                                ...           5 months ago
  • 1.6.3                                ...           5 months ago
  • 1.6.3-alpha1                                ...           5 months ago
  • 1.6.2-alpha4                                ...           5 months ago
  • 1.6.2                                ...           5 months ago
  • 1.6.2-alpha3                                ...           5 months ago
  • 1.6.2-alpha2                                ...           5 months ago
  • 1.6.2-alpha1                                ...           5 months ago
  • 1.6.1                                ...           5 months ago
  • 1.6.1-alpha4                                ...           5 months ago
  • 1.6.1-alpha3                                ...           5 months ago
  • 1.6.1-alpha2                                ...           5 months ago
  • 1.6.1-alpha1                                ...           5 months ago
  • 1.6.0                                ...           6 months ago
  • 1.5.4                                ...           6 months ago
  • 1.5.3                                ...           6 months ago
  • 1.5.3-alpha5                                ...           6 months ago
  • 1.5.3-alpha4                                ...           6 months ago
  • 1.5.3-alpha3                                ...           6 months ago
  • 1.5.2-alpha5                                ...           6 months ago
  • 1.5.2-alpha4                                ...           6 months ago
  • 1.5.3-alpha2                                ...           6 months ago
  • 1.5.3-alpha1                                ...           6 months ago
  • 1.5.2                                ...           6 months ago
  • 1.5.2-alpha3                                ...           6 months ago
  • 1.5.2-alpha2                                ...           6 months ago
  • 0.228.7                                ...           6 months ago
  • 0.228.7-alpha1                                ...           6 months ago
  • 0.228.7-alpha0                                ...           6 months ago
  • 0.228.6                                ...           6 months ago
  • 0.228.6-alpha0                                ...           6 months ago
  • 1.5.2-alpha1                                ...           6 months ago
  • 1.5.1                                ...           6 months ago
  • 0.228.5                                ...           6 months ago
  • 0.228.5-alpha0                                ...           6 months ago
  • 1.5.0                                ...           6 months ago
  • 1.5.0-alpha5                                ...           6 months ago
  • 1.5.0-alpha0                                ...           6 months ago
  • 1.5.0-alpha4                                ...           6 months ago
  • 1.3.7-228.4                                ...           6 months ago
  • 1.3.7-226.5-alpha3                                ...           6 months ago
  • 1.3.7-226.5-alpha2                                ...           6 months ago
  • 1.3.7-228.3                                ...           6 months ago
  • 1.3.7-228.2                                ...           6 months ago
  • 1.3.7-228.1                                ...           6 months ago
  • 1.5.0-alpha3                                ...           6 months ago
  • 1.3.7-226.5-alpha1                                ...           7 months ago
  • 1.3.7-226.4                                ...           7 months ago
  • 1.3.7-226.3                                ...           7 months ago
  • 1.3.7-226.3-alpha0                                ...           7 months ago
  • 1.4.0                                ...           7 months ago
  • 1.3.7-226.2                                ...           7 months ago
  • 1.3.7-226.1                                ...           7 months ago
  • 1.3.7-226.1-alpha1                                ...           7 months ago
  • 1.3.7-226.1-alpha0                                ...           7 months ago
  • 1.5.0-alpha2                                ...           7 months ago
  • 1.5.0-alpha1                                ...           7 months ago
  • 1.4.0-alpha3                                ...           7 months ago
  • 1.3.13-alpha1                                ...           7 months ago
  • 1.3.12                                ...           7 months ago
  • 1.3.12-alpha2                                ...           7 months ago
  • 1.3.12-alpha1                                ...           7 months ago
  • 1.4.0-alpha2                                ...           7 months ago
  • 1.4.0-alpha1                                ...           7 months ago
  • 1.3.11                                ...           7 months ago
  • 1.3.11-alpha1                                ...           7 months ago
  • 1.3.10                                ...           7 months ago
  • 1.3.9                                ...           7 months ago
  • 1.3.8                                ...           7 months ago
  • 1.3.8-alpha2                                ...           7 months ago
  • 1.3.8-alpha1                                ...           7 months ago
  • 1.3.7-226.0                                ...           7 months ago
  • 1.3.7                                ...           7 months ago
  • 1.3.7-alpha2                                ...           7 months ago
  • 1.3.7-alpha1                                ...           7 months ago
  • 1.3.6                                ...           7 months ago
  • 1.3.6-alpha4                                ...           7 months ago
  • 1.3.6-alpha3                                ...           8 months ago
  • 1.3.6-alpha2                                ...           8 months ago
  • 1.3.6-alpha1                                ...           8 months ago
  • 1.3.5                                ...           8 months ago
  • 1.3.4-alpha0                                ...           8 months ago
  • 1.3.4                                ...           8 months ago
  • 1.3.3                                ...           8 months ago
  • 1.3.3-alpha1                                ...           8 months ago
  • 1.3.2                                ...           8 months ago
  • 1.3.2-alpha1                                ...           8 months ago
  • 1.3.1                                ...           8 months ago
  • 1.3.1-alpha1                                ...           8 months ago
  • 1.3.0                                ...           8 months ago
  • 1.2.5                                ...           8 months ago
  • 1.2.5-alpha21                                ...           8 months ago
  • 1.2.5-alpha20 [deprecated]           ...           8 months ago
  • 1.2.5-alpha19 [deprecated]           ...           8 months ago
  • 1.2.5-alpha18 [deprecated]           ...           8 months ago
  • 1.2.5-alpha17 [deprecated]           ...           8 months ago
  • 1.2.5-alpha16 [deprecated]           ...           8 months ago
  • 1.2.5-alpha13 [deprecated]           ...           8 months ago
  • 1.2.5-alpha12 [deprecated]           ...           8 months ago
  • 1.2.5-alpha11 [deprecated]           ...           8 months ago
  • 1.2.5-alpha8 [deprecated]           ...           8 months ago
  • 1.2.5-alpha7 [deprecated]           ...           8 months ago
  • 1.2.5-alpha6 [deprecated]           ...           8 months ago
  • 1.2.5-alpha5 [deprecated]           ...           8 months ago
  • 1.2.5-alpha4 [deprecated]           ...           8 months ago
  • 1.2.5-alpha3 [deprecated]           ...           8 months ago
  • 1.2.5-alpha2 [deprecated]           ...           8 months ago
  • 1.2.5-alpha1 [deprecated]           ...           8 months ago
  • 1.3.0-alpha6                                ...           8 months ago
  • 1.2.4                                ...           8 months ago
  • 1.2.3                                ...           8 months ago
  • 1.3.0-alpha5                                ...           8 months ago
  • 1.3.0-alpha4                                ...           8 months ago
  • 1.3.0-alpha3                                ...           8 months ago
  • 1.2.2                                ...           9 months ago
  • 1.3.0-alpha2                                ...           9 months ago
  • 1.2.2-alpha2                                ...           9 months ago
  • 1.1.13-224.8                                ...           9 months ago
  • 1.1.13-224.8-alpha4                                ...           9 months ago
  • 1.1.13-224.8-alpha3                                ...           9 months ago
  • 1.1.13-224.8-alpha2                                ...           9 months ago
  • 1.1.13-224.8-alpha1                                ...           9 months ago
  • 1.2.2-alpha1                                ...           9 months ago
  • 1.1.13-224.7                                ...           9 months ago
  • 1.1.13-224.6                                ...           9 months ago
  • 1.1.13-224.5                                ...           9 months ago
  • 1.1.13-224.5-alpha1                                ...           9 months ago
  • 1.2.1                                ...           9 months ago
  • 1.2.1-alpha1                                ...           9 months ago
  • 1.3.0-alpha1                                ...           9 months ago
  • 1.2.0                                ...           9 months ago
  • 1.2.0-alpha15                                ...           9 months ago
  • 1.2.0-alpha14                                ...           9 months ago
  • 1.2.0-alpha13                                ...           9 months ago
  • 1.2.0-alpha12                                ...           9 months ago
  • 1.2.0-alpha10                                ...           9 months ago
  • 1.1.17-alpha1                                ...           9 months ago
  • 1.2.0-alpha9                                ...           9 months ago
  • 1.2.0-alpha8                                ...           9 months ago
  • 1.2.0-alpha6                                ...           9 months ago
  • 1.2.0-alpha5                                ...           9 months ago
  • 1.1.16                                ...           10 months ago
  • 1.1.16-alpha2                                ...           10 months ago
  • 1.1.16-alpha1                                ...           10 months ago
  • 1.1.13-224.4                                ...           10 months ago
  • 1.1.13-224.4alpha2                                ...           10 months ago
  • 1.1.13-224.4-alpha1                                ...           10 months ago
  • 1.1.15                                ...           10 months ago
  • 1.1.15-alpha1                                ...           10 months ago
  • 1.1.14                                ...           a year ago
  • 1.1.13-224.3                                ...           a year ago
  • 1.1.14-alpha5                                ...           a year ago
  • 1.1.14-alpha4                                ...           a year ago
  • 1.1.14-alpha3                                ...           a year ago
  • 1.1.14-alpha2                                ...           a year ago
  • 1.1.13-224.2                                ...           a year ago
  • 1.1.13-224.1                                ...           a year ago
  • 1.1.14-alpha1                                ...           a year ago
  • 1.1.13                                ...           a year ago
  • 1.1.12                                ...           a year ago
  • 1.1.12-alpha2                                ...           a year ago
  • 1.1.12-alpha1                                ...           a year ago
  • 1.1.11                                ...           a year ago
  • 1.1.11-alpha2                                ...           a year ago
  • 1.1.11-alpha1                                ...           a year ago
  • 1.1.11-alpha                                ...           a year ago
  • 1.1.10                                ...           a year ago
  • 1.1.10-alpha2                                ...           a year ago
  • 1.1.10-alpha1                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.9-alpha1                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.8-alpha1                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.7-alpha.0                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4-alpha7                                ...           a year ago
  • 1.1.4-alpha6                                ...           a year ago
  • 1.1.4-alpha5                                ...           a year ago
  • 1.1.4-alpha4                                ...           a year ago
  • 1.2.0-alpha4                                ...           a year ago
  • 1.1.4-alpha891                                ...           a year ago
  • 1.1.4-alpha890                                ...           a year ago
  • 1.1.4-alpha889                                ...           a year ago
  • 1.1.4-alpha888                                ...           a year ago
  • 1.1.4-alpha3                                ...           a year ago
  • 1.2.0-alpha3                                ...           a year ago
  • 1.1.4-alpha2                                ...           a year ago
  • 1.1.4-alpha1                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2-alpha1                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.1-alpha6                                ...           a year ago
  • 1.1.1-alpha5                                ...           a year ago
  • 1.1.1-alpha4                                ...           a year ago
  • 1.2.0-alpha2                                ...           a year ago
  • 1.2.0-alpha1                                ...           a year ago
  • 1.1.1-alpha3                                ...           a year ago
  • 1.1.1-alpha2                                ...           a year ago
  • 1.1.1-alpha1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.1.0-beta8                                ...           a year ago
  • 1.1.0-beta7                                ...           a year ago
  • 1.1.0-beta6                                ...           a year ago
  • 1.1.0-beta5                                ...           a year ago
  • 1.1.0-beta4                                ...           a year ago
  • 1.1.0-beta3                                ...           a year ago
  • 1.1.0-beta2                                ...           a year ago
  • 1.1.0-beta1                                ...           a year ago
  • 1.0.3-alpha.74                                ...           a year ago
  • 1.1.0-alpha1000                                ...           a year ago
  • 1.0.3-beta.67                                ...           a year ago
  • 1.0.2-test6                                ...           a year ago
  • 1.0.2-test5                                ...           a year ago
  • 1.0.2-test4                                ...           a year ago
  • 1.0.2-test3                                ...           a year ago
  • 1.0.2-test2                                ...           a year ago
  • 1.1.0-alpha19                                ...           a year ago
  • 1.1.0-alpha18                                ...           a year ago
  • 1.1.0-alpha17                                ...           a year ago
  • 1.1.0-alpha16                                ...           a year ago
  • 1.1.0-alpha15                                ...           a year ago
  • 1.1.0-alpha14                                ...           a year ago
  • 1.1.0-alpha13                                ...           a year ago
  • 1.1.0-alpha12                                ...           a year ago
  • 1.1.0-alpha11                                ...           a year ago
  • 1.1.0-alpha10                                ...           a year ago
  • 1.1.0-alpha9                                ...           a year ago
  • 1.1.0-alpha8                                ...           a year ago
  • 1.1.0-alpha7                                ...           a year ago
  • 1.1.0-alpha6                                ...           a year ago
  • 1.1.0-alpha5                                ...           a year ago
  • 1.1.0-alpha4                                ...           a year ago
  • 1.1.0-alpha3                                ...           a year ago
  • 1.1.0-alpha2                                ...           a year ago
  • 1.1.0-alpha1                                ...           a year ago
  • 1.1.0-alpha0                                ...           a year ago
  • 1.0.2-222.13-alpha0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 2.0.0-rc.1                                ...           2 years ago
  • 1.0.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |