openclaw/apps/macos/Sources/Clawdis/Resources/WebChat/vendor/lit
2025-12-07 00:05:38 +01:00
..
decorators
development
directives
async-directive.d.ts
async-directive.d.ts.map
async-directive.js
async-directive.js.map
decorators.d.ts
decorators.d.ts.map
decorators.js
decorators.js.map
directive-helpers.d.ts
directive-helpers.d.ts.map
directive-helpers.js
directive-helpers.js.map
directive.d.ts
directive.d.ts.map
directive.js
directive.js.map
html.d.ts
html.d.ts.map
html.js
html.js.map
index.d.ts
index.d.ts.map
index.js
index.js.map
LICENSE
logo.svg
package.json
polyfill-support.d.ts
polyfill-support.d.ts.map
polyfill-support.js
polyfill-support.js.map
README.md
static-html.d.ts
static-html.d.ts.map
static-html.js
static-html.js.map

Lit

Simple. Fast. Web Components.

Build Status Published on npm Join our Discord Mentioned in Awesome Lit

Lit is a simple library for building fast, lightweight web components.

At Lit's core is a boilerplate-killing component base class that provides reactive state, scoped styles, and a declarative template system that's tiny, fast and expressive.

Documentation

See the full documentation for Lit at lit.dev

Overview

Lit provides developers with just the right tools to build fast web components:

  • A fast declarative HTML template system
  • Reactive property declarations
  • A customizable reactive update lifecycle
  • Easy to use scoped CSS styling

Lit builds on top of standard web components, and makes them easier to write:

import {LitElement, html, css} from 'lit';
import {customElement, property} from 'lit/decorators.js';

// Registers the element
@customElement('my-element')
export class MyElement extends LitElement {
  // Styles are applied to the shadow root and scoped to this element
  static styles = css`
    span {
      color: green;
    }
  `;

  // Creates a reactive property that triggers rendering
  @property()
  mood = 'great';

  // Render the component's DOM by returning a Lit template
  render() {
    return html`Web Components are <span>${this.mood}</span>!`;
  }
}

Once you've defined your component, you can use it anywhere you use HTML:

<my-element mood="awesome"></my-element>

Contributing

Please see CONTRIBUTING.md.