v1.0
Docs / Components / Demo

Components Demo

This page demonstrates all JavaScript components with live, interactive examples.

Note: Open your browser console (F12) to see component interactions.

1. Toast Notifications

Lightweight toast notifications using ToastComponent.


2. AppAlert (SweetAlert Wrapper)

Branded SweetAlert dialogs using AppAlert.

Confirmation Dialogs

Animations


3. Modal Component

Modal dialogs using ModalComponent.


4. Tooltip Component

Hover tooltips using TooltipComponent.


5. Dropdown Component

Click/hover dropdowns using DropdownComponent.


6. File Downloader

File downloads using FileDownloader.

(Note: This demo shows the loading indicator only)

7. AJAX Form

Form submission with AJAX using AjaxForm.


8. DataTable Component

Enhanced tables using DataTableComponent.

8.1 Basic DataTable

IDNameEmailRole
1John Doejohn@example.comAdmin
2Jane Smithjane@example.comEditor
3Bob Wilsonbob@example.comUser

8.2 Grouped DataTable with Subtotals

Use data-grouped="true" with data-group-column and data-subtotal-columns.

NONAMA PELANGGANNAMA BARANGKUANTITASPENJUALAN
1AFCAR CELL (WKB)GAJAH BARU KRETEK (12)8007.200.000
2ALAM SUBUR (WTB)ON BOLD FILTER (20)2004.870.000
3ALAM SUBUR (WTB)GAJAH BARU KRETEK (12)8007.200.000
4BERKAH JAYA (WTC)MARLBORO RED (20)5006.500.000
5BERKAH JAYA (WTC)SAMPOERNA MILD (16)3004.200.000
<table data-datatable 
       data-grouped="true" 
       data-group-column="1"
       data-subtotal-columns="[3,4]"
       data-collapsible="true"
       data-show-grand-total="true"
       data-grand-total-label="TOTAL SELURUH PENJUALAN">

9. Prefetch

Page prefetching using Prefetch.

Hover over these links to prefetch:


10. Sidebar Component

Collapsible sidebar using SidebarComponent.

(Works on admin layouts with sidebar)

11. Lightbox Component

Image galleries using LightboxComponent.

Image 1Image 2Image 3
(Click images to open lightbox)

Quick Reference

// Toast
ToastComponent.success('Message');
ToastComponent.error('Message');

// AppAlert
AppAlert.success('Message');
AppAlert.confirm('Are you sure?').then(r => { if(r.isConfirmed) { ... } });
AppAlert.confirmDelete('This will be deleted');

// Modal
ModalComponent.open('modalId');
ModalComponent.close('modalId');

// FileDownloader
FileDownloader.download('/export/data', 'filename.xlsx');

// Prefetch
Prefetch.enable();
Prefetch.disable();
Prefetch.clearCache();
ESC

Start typing to search the documentation