Gathering detailed insights and metrics for lit-html
Gathering detailed insights and metrics for lit-html
Gathering detailed insights and metrics for lit-html
Gathering detailed insights and metrics for lit-html
Lit is a simple library for building fast, lightweight web components.
npm install lit-html
Typescript
Module System
Node Version
NPM Version
lit-element@4.2.1
Updated on Jul 11, 2025
@lit-labs/virtualizer@2.1.1
Updated on Jul 11, 2025
@lit/react@1.0.8
Updated on Jul 11, 2025
@lit/reactive-element@2.1.1
Updated on Jul 11, 2025
@lit-labs/signals@0.1.3
Updated on Jul 11, 2025
@lit/task@1.0.3
Updated on Jul 11, 2025
TypeScript (58.93%)
JavaScript (38.48%)
HTML (2.19%)
CSS (0.23%)
Vue (0.17%)
Shell (0.01%)
Total Downloads
336,485,810
Last Day
563,733
Last Week
3,024,279
Last Month
13,415,015
Last Year
132,672,724
BSD-3-Clause License
19,920 Stars
2,572 Commits
975 Forks
211 Watchers
217 Branches
194 Contributors
Updated on Jul 11, 2025
Latest Version
3.3.1
Package Id
lit-html@3.3.1
Unpacked Size
1.63 MB
Size
306.43 kB
File Count
363
NPM Version
10.8.2
Node Version
20.19.3
Published on
Jul 11, 2025
Cumulative downloads
Total Downloads
Last Day
-2.6%
563,733
Compared to previous day
Last Week
-3.4%
3,024,279
Compared to previous week
Last Month
6%
13,415,015
Compared to previous month
Last Year
30.1%
132,672,724
Compared to previous year
Efficient, Expressive, Extensible HTML templates in JavaScript
lit-html is the template system that powers the Lit library for building fast web components.
When using lit-html
to develop web components, most users should import lit-html via the lit
package rather than installing and importing from lit-html
directly.
Full documentation is available at lit.dev/docs/templates/overview/.
lit-html
lets you write HTML templates in JavaScript with template literals.
lit-html templates are plain JavaScript and combine the familiarity of writing HTML with the power of JavaScript. lit-html takes care of efficiently rendering templates to DOM, including efficiently updating the DOM with new values.
1import {html, render} from 'lit-html'; 2 3// This is a lit-html template function. It returns a lit-html template. 4const helloTemplate = (name) => html`<div>Hello ${name}!</div>`; 5 6// This renders <div>Hello Steve!</div> to the document body 7render(helloTemplate('Steve'), document.body); 8 9// This updates to <div>Hello Kevin!</div>, but only updates the ${name} part 10render(helloTemplate('Kevin'), document.body);
lit-html
provides two main exports:
html
: A JavaScript template tag used to produce a TemplateResult
, which is a container for a template, and the values that should populate the template.render()
: A function that renders a TemplateResult
to a DOM container, such as an element or shadow root.1$ npm install lit-html
Or use from lit
:
1$ npm install lit
Please see CONTRIBUTING.md.
No vulnerabilities found.
Reason
all last 30 commits are reviewed through GitHub
Reason
30 commit(s) out of 30 and 22 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
no vulnerabilities detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
dangerous workflow patterns detected
Details
Reason
security policy file not detected
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More