Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 3.59 KB

File metadata and controls

63 lines (42 loc) · 3.59 KB

Lit snippets

Lit snippets for Visual Studio Code.

Screenshots

JavaScript

Javascript Demo

TypeScript

Typescript Demo

Features

  • Supports both JavaScript and TypeScript with Lit 3

List

Element and Its Property Snippets

Trigger Snippet
litbase Create LitElement subclasss
littemplate 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
ctlittemplate Create @conectate/components/ct-lit subclasss with styles and render fn

Event Related Snippets

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

Other Snippets

Trigger Snippet
importele Import other element

Contact

Issues issues or for any features, please tweet us @herberthobregon.

License

Please read License for more information