Lit snippets for Visual Studio Code.
- Supports both JavaScript and TypeScript with Lit 2.0
Trigger | Snippet |
---|---|
litbase | Create LitElement subclasss |
lit template | Create LitElement subclasss with styles and render fn |
litprop | Generate property |
litquery | Generate @query property |
litqueryall | Generate @queryall property |
litrender | Generate render function with lit-html |
litstyles | Generate styles static property |
ctlit template | Create @conectate/ct-lit subclasss with styles and render fn |
Trigger | Snippet |
---|---|
addeventlistener | Generate component's event listener |
litfire | fire | litdispatchevent | Generate dispatch of the event |
Custom Element Lifecycle Callback Snippets
Trigger | Snippet |
---|---|
connectedcallback | Generate connectedCallback() |
disconnectedcallback | Generate disconnectedCallback() |
adoptedcallback | Generate adoptedCallback() |
attributechangedcallback | Generate attributechangedCallback(_,_,_) |
observedattributes | Generate static get observedAttributes() see Observing changes to attributes |
Trigger | Snippet |
---|---|
importele | Import other element |
Issues issues or for any features, please tweet us @herberthobregon.
Please read License for more information