Skip to content

litelement-dev/lit-snippets

Repository files navigation

Lit snippets

Lit snippets for Visual Studio Code.

Screenshots

JavaScript

Javascript Demo

TypeScript

Typescript Demo

Features

  • Supports both JavaScript and TypeScript with Lit 2.0

List

Element and Its Property Snippets

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

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

Releases

No releases published

Packages

No packages published