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

svelte-advanced-datatable

v0.16.0

Published

A configurable, server-aware data table for Svelte 5 with first-class support for [DaisyUI](https://daisyui.com).

Readme

Svelte Advanced DataTable

A configurable, server-aware data table for Svelte 5 with first-class support for DaisyUI.

Features

  • Server-side or client-side dataFetchApiDataSource, ApiFunctionDataSource, SvelteQueryDataSource, or LocalDataSource (client-side filter, sort, paginate).
  • Pagination with configurable page size and an items-per-page selector.
  • Sorting — click to sort, Shift-click for multi-column sort.
  • Search and filtering — basic text search or a structured query parser with field aliases.
  • Row selection and actions — single + multi-select with a bulk action toolbar, per-row dropdown, primary/destructive variants, two-way bind:selectedIds.
  • Settings popover — items per page, density (compact/default/spacious), column visibility, column reordering, reset persisted column widths.
  • Column resizing and reordering with persisted widths and order.
  • Sticky header that pins while the body scrolls.
  • Export — CSV / JSON popover with delimiter, quoting and line-ending options. Use buildExportUrl to delegate large exports to the server.
  • State persistence — separate session and persistent tiers (sessionStorage / localStorage / custom backend) for page, sort, search, column order, widths, density and items-per-page.
  • Internationalisation — built-in message config, svelte-i18n, or a custom MessageFormatter.
  • Error handlingonError callback plus a customisable errorState slot.
  • Custom column components for fully bespoke cell rendering.

Quick links

Installation

# Install Tailwind CSS and DaisyUI first (see https://daisyui.com/docs/install)

pnpm add svelte-advanced-datatable

Basic usage

<script lang="ts">
    import type { DataTableConfig } from 'svelte-advanced-datatable';
    import { ComponentType, FetchApiDataSource } from 'svelte-advanced-datatable';
    import { DataTable } from 'svelte-advanced-datatable/daisyUi';

    interface UserData {
        id: number;
        userName: string;
    }

    const config: DataTableConfig<UserData> = {
        type: 'userData',
        columnProperties: {
            id: { type: ComponentType.NUMBER },
            userName: { type: ComponentType.STRING }
        },
        dataUniquePropertyKey: 'id',
        messageConfig: {
            id: { label: 'Id' },
            userName: { label: 'Username' }
        }
    };

    const dataSource = new FetchApiDataSource<UserData>('/api/users/list');
</script>

<DataTable {config} {dataSource} />

Selection + actions

Register actions to automatically get a checkbox column, a per-row dropdown and a bulk toolbar:

<script lang="ts">
    import type { SelectionId } from 'svelte-advanced-datatable';

    let selectedIds: SelectionId[] = $state([]);

    const config: DataTableConfig<UserData> = {
        // ...other options
        actions: [
            { key: 'edit', onSingle: (user) => editUser(user) },
            { key: 'archive', primary: true, onMulti: (ids) => archive(ids) },
            { key: 'delete', variant: 'destructive', primary: true, onMulti: (ids) => remove(ids) }
        ]
    };
</script>

<DataTable {config} {dataSource} bind:selectedIds />

See the /example/daisy-ui/svelte-query-actions page for a working demo.

Claude Code skills

Building with Claude Code? The repo ships four installable agent skills under skills/ that compress the docs into Claude-actionable guidance.

npx skills add Kage0x3B/svelte-advanced-datatable

| Skill | Covers | | :--------------------------------------- | :------------------------------------------------------------------------------------- | | svelte-advanced-datatable | Install, import map, DataTableConfig, column types, sort/pagination, display. | | svelte-advanced-datatable-data | Data sources, basic + advanced search, error handling. | | svelte-advanced-datatable-interactions | Row selection, per-row + bulk actions, modals/links, CSV/JSON + custom export. | | svelte-advanced-datatable-state | Persistence tiers (URL / Storage / Snapshot) and i18n (messageConfig / svelte-i18n). |

Open the documentation for the full configuration reference and more examples.