Skip to main content
Home

@lithen/fns@4.5.2

latest
Works with
This package works with Node.js, BrowsersIt is unknown whether this package works with Cloudflare Workers, Deno, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score100%
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-html and styled components extensions.
  • Auto Close Tag for auto closing HTML tags.
  • es6-string-html for HTML syntax highlight to custom tag functions, good to work with the el tag function.
  • inline HTML for emmet and IntelliSense in html and css tag functions.

Other libs that are part of Lithen

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@lithen/fns

Import symbol

import * as fns from "@lithen/fns";
or

Import directly with a jsr specifier

import * as fns from "jsr:@lithen/fns";

Add Package

pnpm i jsr:@lithen/fns
or (using pnpm 10.8 or older)
pnpm dlx jsr add @lithen/fns

Import symbol

import * as fns from "@lithen/fns";

Add Package

yarn add jsr:@lithen/fns
or (using Yarn 4.8 or older)
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";