muonw-powertable
Purpose: PowerTable is a Svelte component designed to transform JSON data into an interactive HTML table, enabling manual inspection, sorting, filtering, searching, and editing of data. It is inspired by DataTables and built specifically for Svelte.
Key Features:
- No runtime dependencies
- Sorting (single/multi-column + custom sorting)
- Filtering (per column and global + RegEx + custom filtering)
- Inline editing
- Re-arrangeable layout segments
- Optional styling
- Custom parsing
- Supports both local and remote data sources
Target Audience: Developers working with Svelte who need an interactive, customizable table component for displaying and manipulating JSON data.
Framework Support: Primarily built for Svelte, with no explicit support for other frameworks mentioned.
Core Functionality:
- Data Handling: Works with JSON data (
ptData
prop) and allows customization viaptInstructs
(column definitions) andptOptions
(table behavior). - Remote Data: Supports fetching and displaying remote data via
dataFeed
function. - Customization: Offers slots for overriding default UI elements (e.g., no-results message, loading state) and events for row interactions (
rowClicked
,rowDblClicked
). - Advanced Features: Includes nested sorting, regex filtering, and custom parsing.
- Data Handling: Works with JSON data (
Examples & Documentation:
- Live demos available at muonw.github.io/muonw-powertable/examples/example1 .
- Detailed manual covers props (
ptInstructs
,ptOptions
,ptData
), events, slots, and utility functions likegetData
.
Objectives:
- Prioritizes performance (handles 1000+ rows smoothly).
- Focuses on Svelte compatibility, accessibility, and ease of use.
- Avoids third-party runtime dependencies and theming constraints.
Contribution: Encourages improvements in accessibility, code quality, and testing. Licensed under the Unenforceable license <i
componentdatatablesjavascriptsveltesveltekittypescriptsveltejs
Author
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button