npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

van-ui-extended

v0.1.6

Published

Extended VanJS UI component library: data tables, dashboards, cron builder, wizards, searchable selects, and CodeMirror/ECharts/Leaflet integrations.

Downloads

953

Readme

van-ui-extended

A comprehensive library of reusable graphical components built on top of VanJS. This project extends the core VanJS capabilities with advanced UI components and third-party integrations.

Key Features

  • VanJS Integration: Built with simplicity and performance in mind using VanJS.
  • Advanced Components: Includes complex components like data tables, wizards, and cron editors.
  • Third-party Integrations:
    • CodeMirror: Full-featured code editor with JS, JSON, and Markdown support.
    • ECharts: Powerful charting and visualization.
    • GridStack: Draggable / resizable dashboard layouts (via xDashboard).
    • Leaflet: Interactive maps.
    • Pikaday: Lightweight date picking.
  • Tailwind CSS: Styled using modern Utility-first CSS.
  • TypeScript: Fully typed for a better developer experience.

Getting Started

Prerequisites

Ensure you have Node.js installed on your machine.

Installation

Clone the repository and install the dependencies:

git clone https://github.com/danvifer/van-ui-extended.git
cd van-ui-extended
npm install

Development Mode

To start the project in development mode with hot-reload:

npm run dev

This will start a Vite development server on http://localhost:3030. Demo pages live under demo/:

  • / — dashboard home (demo/main.ts) showcasing every component inside an xDashboard.
  • /demo/pages/<component>/ — isolated demo per component.

Build

To build the library for production:

npm run build

The output will be generated in the dist directory.

To generate TypeScript declarations:

npm run types

Available Components

The library exports the following components:

  • TableComponent: Advanced data table with search and pagination.
  • TextAreaComponent: Enhanced text area.
  • Select: Standard select component.
  • xSelect / xOption: Extended select component with search and custom rendering.
  • WizardComponent: Step-by-step wizard interface.
  • CronComponent: Visual cron expression editor.
  • Widget: Base widget container.
  • TimePickerComponent: Simple time selection.
  • xButton: Extended button component.
  • xLastValue: Component for displaying historical data/values.
  • xCodeMirror: Integration with CodeMirror 6.
  • xChart: ECharts wrapper with reactive options.
  • xDashboard: Draggable / resizable dashboard grid powered by GridStack.
  • xTable: Feature-rich data table — sorting, a collapsible per-column filter row, pagination, row selection, expandable rows, virtual scrolling and light/dark themes.

xDashboard

Wrapper around GridStack following the VanJS reactive prop pattern. Each item carries its own HTMLElement (or factory), and the grid emits layout changes via onChange.

gridstack is a peer dependency — install it in your app:

npm install gridstack

You must also import GridStack's CSS once at your app entry:

import "gridstack/dist/gridstack.min.css"

Minimal usage:

import van from "vanjs-core"
import { xDashboard } from "van-ui-extended"

const dashboard = xDashboard({
  column: 12,
  cellHeight: 80,
  items: [
    { id: "a", x: 0, y: 0, w: 6, h: 4, content: someChart() },
    { id: "b", x: 6, y: 0, w: 6, h: 4, content: someTable() },
  ],
  onChange: (nodes) => console.log("layout", nodes),
})

van.add(document.body, dashboard)

xTable

Feature-rich, reactive data table. Rows are a VanJS State<T[]>; columns declare their key, label, alignment and per-column sort/filter. It supports:

  • Client- or server-side pagination (a pagination state, or an onRequest hook for server mode). The pagination footer renders as a fixed bar outside the scroll region, so it never overlaps rows.
  • A collapsible per-column filter row below the headers (filterCellByKey + filterCellsVisible).
  • Sorting, row selection, expandable rows and virtual scrolling for large datasets.
  • Custom cell rendering via slots (headerCellByKey / bodyCellByKey / slots) and light/dark themes.

The source lives under lib/xTable/ (split into xTable.body, xTable.filter, xTable.pagination, xTable.selection, xTable.themes, xTable.virtualScroll, …); import the public component and its types from the package root.

Minimal usage:

import van from "vanjs-core"
import { xTable } from "van-ui-extended"
import type { XColumn } from "van-ui-extended"

type Row = { id: string; name: string; status: string }

const rows = van.state<Row[]>([
  { id: "1", name: "edge-01", status: "up" },
  { id: "2", name: "nas-01", status: "down" },
])

const columns: XColumn<Row>[] = [
  { key: "name", label: "Name", sortable: true },
  { key: "status", label: "Status" },
]

van.add(document.body, xTable<Row>({ rows, columns, rowKey: (r) => r.id }))

An optional scrollClass prop overrides the inner scroll region's classes (default "flex-1 min-h-0 overflow-auto").

Example Usage

import van from "vanjs-core"
import { xSelect, xOption } from "van-ui-extended"

const MyComponent = () => {
  return xSelect(
    { placeholder: "Select a language" },
    xOption({ value: "js", text: "JavaScript" }),
    xOption({ value: "ts", text: "TypeScript" })
  )
}

van.add(document.body, MyComponent())

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.