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

@kikiloaw/datatable-vue3

v1.0.4

Published

A datatable caching component

Readme

datatable-vue3

datatable-vue3 is a Vue 3 wrapper for DataTables.net that provides a ready-to-use datatable component with all the features of DataTables.net including sorting, searching, pagination, and more.

Features

  • Ready to Use: No complex setup required - just import and use
  • Full DataTables.net Support: All DataTables.net features including sorting, searching, pagination
  • Vue 3 Compatible: Built specifically for Vue 3 with Composition API
  • Export Capabilities: Built-in support for PDF, CSV, copy, and print and now excelHtml5, excel
  • Responsive Design: Mobile-friendly responsive tables
  • Fixed Columns/Headers: Support for fixed columns and headers
  • Row Selection: Built-in row selection functionality
  • Server-side Processing: AJAX data loading support

Installation

npm install @kikiloaw/datatable-vue3@latest

New Export added

now excelHtml5, excel

Basic Usage

<template>
  <DatatableVue3 
      ref="table" 
      :ajaxUrl="route('Users.List')" 
      :options="options" 
      :parameters="campus" 
      :max="5">
    <!-- Custom Table Headers -->
    <template #table-headers>
      <th>#</th>
      <th>Name</th>
      <th>Description</th>
      <th>Type</th>
      <th>password</th>
      <th>Actions</th>
    </template>
    <!-- Custom Actions Column -->
    <template #column-5="{ rowData }">
      <ButtonNew types="settings" tooltips="password" @click="changePass(rowData[5])" />
    </template>

  </DatatableVue3>

</template>

<script setup>
import { ref } from 'vue';
import 'datatables.net-dt/css/dataTables.dataTables.css';
import DatatableVue3 from '@kikiloaw/datatable-vue3';

const table = ref();

const options = {
  processing: true,
  serverSide: true,
  select: true,
  pageLength: 10,
  responsive:false,
  ordering: false,
  lengthMenu: [
    { label: '10', value: 10 },
    { label: '20', value: 20 },
    { label: '50', value: 50 },
    { label: '100', value: 100 },
    { label: '500', value: 500 },
    { label: '1000', value: 1000 }
  ],
  columnDefs: [
    {
      target: 4,
      visible: false
    }
  ],
  scrollX: true,
  pagingType: 'full_numbers',
};
</script>

Component Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | options | Object | Yes | DataTables configuration options | | ajaxUrl | String | No | API endpoint for fetching data | | parameters | Object | No | Additional parameters to send with requests | | max | Number | Yes | Maximum number of columns |

Template Slots

The component uses template slots for flexible table structure:

  • #table-headers: Define your table headers using <th> elements
  • #column-{index}: Custom content for specific columns (0-indexed)
  • rowData: Access row data by index in column templates

Available Methods

The component exposes useful methods through the ref:

const table = ref();

// Reload the table data
const reload = () => {
  if (table.value) {
    table.value.reload();
  }
};

Available DataTables.net Features

This wrapper supports all DataTables.net features including:

  • Core Features: Processing, paging, ordering, searching, info
  • Extensions: Buttons, ColReorder, RowReorder, FixedColumns, FixedHeader
  • Responsive: Mobile-friendly responsive tables
  • Internationalization: Multi-language support
  • Export: Copy, CSV, Excel, PDF, Print
  • Selection: Row and column selection
  • Keyboard Navigation: Keyboard shortcuts and navigation

Styling

The component automatically includes DataTables.net CSS. You can customize the appearance by adding your own CSS:

/* Custom styling */
.display {
  border: 1px solid #ddd;
  border-radius: 4px;
}

.display thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.display tbody tr:hover {
  background-color: #f5f5f5;
}

Dependencies

This package includes all necessary DataTables.net dependencies:

  • datatables.net-vue3 - Core DataTables.net for Vue 3
  • datatables.net-dt - DataTables.net styling
  • datatables.net-buttons-dt - Export buttons
  • datatables.net-fixedcolumns-dt - Fixed columns
  • datatables.net-fixedheader-dt - Fixed headers
  • datatables.net-responsive-dt - Responsive tables
  • datatables.net-select-dt - Row/column selection

License

This project is licensed under the MIT License.

DataTables.net Documentation

For more advanced features and configuration options, visit the official DataTables.net documentation: