|
|
1 неделя назад | |
|---|---|---|
| .. | ||
| directives | 1 неделя назад | |
| LICENSE | 1 неделя назад | |
| README.md | 1 неделя назад | |
| async-directive.d.ts | 1 неделя назад | |
| async-directive.d.ts.map | 1 неделя назад | |
| async-directive.js | 1 неделя назад | |
| async-directive.js.map | 1 неделя назад | |
| decorators.d.ts | 1 неделя назад | |
| decorators.d.ts.map | 1 неделя назад | |
| decorators.js | 1 неделя назад | |
| decorators.js.map | 1 неделя назад | |
| directive-helpers.d.ts | 1 неделя назад | |
| directive-helpers.d.ts.map | 1 неделя назад | |
| directive-helpers.js | 1 неделя назад | |
| directive-helpers.js.map | 1 неделя назад | |
| directive.d.ts | 1 неделя назад | |
| directive.d.ts.map | 1 неделя назад | |
| directive.js | 1 неделя назад | |
| directive.js.map | 1 неделя назад | |
| html.d.ts | 1 неделя назад | |
| html.d.ts.map | 1 неделя назад | |
| html.js | 1 неделя назад | |
| html.js.map | 1 неделя назад | |
| index.d.ts | 1 неделя назад | |
| index.d.ts.map | 1 неделя назад | |
| index.js | 1 неделя назад | |
| index.js.map | 1 неделя назад | |
| logo.svg | 1 неделя назад | |
| package.json | 1 неделя назад | |
| polyfill-support.d.ts | 1 неделя назад | |
| polyfill-support.d.ts.map | 1 неделя назад | |
| polyfill-support.js | 1 неделя назад | |
| polyfill-support.js.map | 1 неделя назад | |
| static-html.d.ts | 1 неделя назад | |
| static-html.d.ts.map | 1 неделя назад | |
| static-html.js | 1 неделя назад | |
| static-html.js.map | 1 неделя назад | |
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.
See the full documentation for Lit at lit.dev
Lit provides developers with just the right tools to build fast web components:
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>
Please see CONTRIBUTING.md.