Transform JSON data into beautiful, searchable views
Download Back To CSSScript.Com
Lightweight • Zero Dependencies • Two Initialization Methods
SenangWebs Index (SWI) is a lightweight JavaScript library that makes it incredibly easy to display JSON data in a user-friendly format with built-in search and pagination. "Senang" means "easy" in Malay, and that's exactly what this library is all about!
Choose between declarative HTML attributes for zero-JavaScript setup, or use the
programmatic API for maximum flexibility and control.
See both initialization methods side-by-side with interactive API controls. Perfect for understanding the differences and testing all features.
Initialize SWI directly in your HTML using data-* attributes.
Perfect for quick prototypes and simple use cases where you want to get up and running fast.
Use the JavaScript API for complete control over your data display. Ideal for complex applications, dynamic content, and when you need programmatic access.
Declarative (HTML):
Just add the attributes to your HTML and include the script:
<div data-swi-id="myData" data-swi-source="./data.json">...</div>
Programmatic (JavaScript):
Initialize with JavaScript for full control:
new SenangWebsIndex({ container: '#app', data: './data.json', ... })