LibraryActive

lit-html

lit-html: › Introduction What is Lit?

Open source page ↗

Field note

What it does

› Introduction What is Lit? Getting Started › Components Overview Defining Rendering Reactive properties Styles Lifecycle Shadow DOM Events Decorators › Templates Overview Expressions Conditionals Lists Built-in directives Custom directives › Composition Overview Component composition Mixins Controllers › Managing Data Context Async Tasks Signals › Tools and workflows Overview Requirements Development Testing Publishing Production Starter kits Adding Lit › Server rendering Overview Server usage Client usage Authoring components DOM emulation › Frameworks React › Localization Overview Runtime mode Transform mode CLI and config Best practices › API LitElement ReactiveElement Templates Styles Decorators Directives Custom directives Static HTML Controllers Misc › Releases Lit 3 upgrade guide › Related libraries Standalone lit-html Lit Labs › Resources Community Contents: ReactiveElement ReactiveElement Attributes Controllers Dev mode Lifecycle Other Properties Rendering Styles Updates ComplexAttributeConverter PropertyDeclaration PropertyDeclarations PropertyValues ReactiveElement Contents ReactiveElement Attributes Controllers Dev mode Lifecycle Other Properties Rendering Styles Updates ComplexAttributeConverter PropertyDeclaration PropertyDeclarations PropertyValues ReactiveElement class # Permalink to ReactiveElement View source Base element class which manages element properties and attributes. When properties change, the update method is asynchr › Introduction What is Lit? Getting Started › Components Overview Defining Rendering Reactive properties Styles Lifecycle Shadow DOM Events Decorators › Templates Overview Expressions Conditionals Lists Built-in directives Custom directives › Composition Overview Component composition Mixins Controllers › Managing Data Context Async Tasks Signals › Tools and workflows Overview Requirements Development Testing Publishing Production Starter kits Adding Lit › Server rendering Overview Server usage Client usage Authoring components DOM emulation › Frameworks React › Localization Overview Runtime mode Transform mode CLI and config Best practices › API LitElement ReactiveElement Templates Styles Decorators Directives Custom directives Static HTML Controllers Misc › Releases Lit 3 upgrade guide › Related libraries Standalone lit-html Lit Labs › Resources Community Contents: LitElement LitElement Attributes Controllers Dev mode Lifecycle Other Properties Rendering Styles Updates RenderOptions LitElement Contents LitElement Attributes Controllers Dev mode Lifecycle Other Properties Rendering Styles Updates RenderOptions LitElement class # Permalink to LitElement View source Base element class that manages element properties and attributes, and renders a lit-html template. Import import { LitElement } from 'lit' ; Details To define a component, subclass LitElement and implement a render method to provide the component's template. Define properties using the properties property or the property decorator. Attributes # Permalink to Attributes attributeChangedCallback ( name , _old , value ): void # Permalink to attributeChangedCallback View source Synchronizes property values whe › Introduction What is Lit? Getting Started › Components Overview Defining Rendering Reactive properties Styles Lifecycle Shadow DOM Events Decorators › Templates Overview Expressions Conditionals Lists Built-in directives Custom directives › Composition Overview Component composition Mixins Controllers › Managing Data Context Async Tasks Signals › Tools and workflows Overview Requirements Development Testing Publishing Production Starter kits Adding Lit › Server rendering Overview Server usage Client usage Authoring components DOM emulation › Frameworks React › Localization Overview Runtime mode Transform mode CLI and config Best practices › API LitElement ReactiveElement Templates Styles Decorators Directives Custom directives Static HTML Controllers Misc › Releases Lit 3 upgrade guide › Related libraries Standalone lit-html Lit Labs › Resources Community Contents: Directives asyncAppend asyncReplace cache choose classMap guard ifDefined join keyed live map range createRef ref repeat styleMap templateContent unsafeHTML unsafeSVG until when Directives Contents asyncAppend asyncReplace cache choose classMap guard ifDefined join keyed live map range createRef ref repeat styleMap templateContent unsafeHTML unsafeSVG until when asyncAppend directi › Introduction What is Lit?

Capabilities

Available capabilities

Tags

Tags

No tags filed yet.

Ways to use it

Ways to use it

No integrations filed yet.

Product features

Product features

addController ( controller ): void

attributeChangedCallback ( name , _old , value ): void

Attributes # Permalink to Attributes

Contents: ReactiveElement

Controllers # Permalink to Controllers

Dev mode # Permalink to Dev mode

Import

ReactiveElement

removeController ( controller ): void

static disableWarning ?: ( warningKind: WarningKind ) => void

static enabledWarnings ?: Array< WarningKind >

static observedAttributes : Array< string >