Notwithstanding Precautions, Misadventure

    TypeScript icon, indicating that this package has built-in type declarations

    2.7.3 • Public • Published

    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.html -->
        <p>Counter: {count}</p>
        <button onclick="{increaseCounter}">Add</button>
    /* 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 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




    npm i lwc


    DownloadsWeekly Downloads






    Unpacked Size

    4.73 MB

    Total Files


    Last publish


    • lwc-admin
    • caridy
    • tbliss
    • pmdartus
    • ekashida
    • diervo
    • gr8gatsby
    • kevinv11n
    • jye-sf
    • rui.qiu
    • ravi.jayaramappa
    • jodarove
    • abdulsattar
    • nolanlawson
    • jmsjtu