Works with
•JSR Score100%•This package works with Node.js, BrowsersIt is unknown whether this package works with Cloudflare Workers, Deno, Bun




Downloads192/wk
•Published8 months ago (4.5.2)
Functions to use with html and css to create simple and powerful UI elements. Its part of Lithen modules. It works alone but is created to use with Web Components.
Lithen Functions
Functions to use with html and css to create simple and powerful UI elements. Its part of Lithen modules. It works alone but is created to use with Web Components.
Getting started
You can see the Getting started page, teaching how to setup a Vanilla project or a project with Vite.
After the Getting started, try this counter modal example:
function counterModal() { const count = signal(0) const dialogRef = ref<HTMLDialogElement>() function increment() { count.set(value => value + 1) } return html` <dialog ref=${dialogRef}> <p>Count: ${count}</p> <button on-click=${increment}> Increment </button> <button on-click=${() => dialogRef.el?.close()}> Close </button> </dialog> <button on-click=${() => dialogRef.el?.showModal()}> Open Modal </button> ` } document.body.append(counterModal())
List of including functions, tag functions and its features
VSCode Extensions Recommendation
- lit-plugin which came with
lit-htmlandstyled componentsextensions. - Auto Close Tag for auto closing HTML tags.
- es6-string-html
for HTML syntax highlight to custom tag functions, good to work with the
eltag function. - inline HTML for emmet
and IntelliSense in
htmlandcsstag functions.
Other libs that are part of Lithen
Add Package
deno add jsr:@lithen/fns
Import symbol
import * as fns from "@lithen/fns";
Import directly with a jsr specifier
import * as fns from "jsr:@lithen/fns";
Add Package
pnpm i jsr:@lithen/fns
pnpm dlx jsr add @lithen/fns
Import symbol
import * as fns from "@lithen/fns";
Add Package
yarn add jsr:@lithen/fns
yarn dlx jsr add @lithen/fns
Import symbol
import * as fns from "@lithen/fns";
Add Package
vlt install jsr:@lithen/fns
Import symbol
import * as fns from "@lithen/fns";
Add Package
npx jsr add @lithen/fns
Import symbol
import * as fns from "@lithen/fns";
Add Package
bunx jsr add @lithen/fns
Import symbol
import * as fns from "@lithen/fns";